php - How to solve Submitted a post into database in Laravel 4? -


when submit question database, show error me problem?

illuminate \ database \ eloquent \ massassignmentexception

question

e:\xampp\htdocs\laravel\vendor\laravel\framework\src\illuminate\database\eloquent\model.php

// assignment model, , others ignored. if ($this->isfillable($key)) { $this->setattribute($key, $value); } elseif ($totallyguarded) { throw new massassignmentexception($key); } } 

you not showing error there, can guess there , getting error on model. may haven't set fillable correctly. can set model in way

class user extends eloquent{   protected $table = 'users';       protected $fillable = array('firstname','lastname','address');   } 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -