Allow mass assignment for all the models in Laravel

· Amit Merchant · Nov. 20, 2021, 7:01 a.m.
Summary
While it’s not recommended to allow all of your model’s attributes mass assignable since in that case you need to make sure to hand-craft the arrays passed to Eloquent’s fill, create, and update methods. But there might be some instances where you may want to consider unguarding all of the attributes. The de-facto way of unguarding a single model is to set an empty array to the $guarded property like so. protected $guarded = []; But what if you want to make all of your models as mass assignable...
AUTHOR