title: Laravel Dynamic Fillable in Models
body: <p>Got stuck in a issue with laravel 5.2.</p>
  
  <p>Following is the error during eloquent create operation(post call),</p>
  
  <p>Mass Assignment Exception in Model.php 453: column_name</p>
  
  <p>Following are the prerequisites, which are to be taken into consideration:</p>
  
  <ol>
  <li>Fillables in model are filled in a dynamic manner by the following code:
  
  <pre>
  public function __construct() {
       $this->fillable(\Schema::getColumnListing($this->getTable()))
  }
  </pre></li>
  </ol>
  
  <p>Following are the methods which are debugged till now:</p>
  
  <ol>
  <li><p>Before insertion, in controller, $model::getillableField(), gives proper fillable array.</p></li>
  <li><p>In model.php line(450), </p>
  
  <pre>
  if ($this->isFillable($key)) {
        $this->setAttribute($key, $value);
  }
  </pre>
  
  <p>the above code returns the value as "false" and $model::getFillableField() has the column_name in the array list.</p></li>
  <li><p>Hardcoding $fillable variable with columns of table removes the error.
  Please Help, where i am going wrong and what is the solution for it?</p></li>
  </ol>
  
  <p>Thanks in advance.</p>