In Laravel, when you make model you need to add "fillable" or "guarded" to store/update records. The columns that are set in "$fillable" are supposed to be mass assigned.

//BookModel.php ... use Illuminate\Database\Eloquent\Model; class Book extends Model { protected $fillable=[ 'title','author' ]; }

If you forget to add "$fillable" or "$guarded", you will get an error as below.

('autor' should be 'author') in "$fillable", for example, protected $fillable=[ 'title','autor' ]; you will get an error, of course.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners