I have around 200 fields in a table that are numbered:
field_1
field_2
etc
I tried to insert data in table:
Result::insert($data);
Where $data
is multiple array:
$data = [] = array("field_1" => 3);
$data = [] = array("field_1" => 2);
Can I set *
in option protected $fillable = ["*"];
to make all fields fillable?
If you need to set all columns as fillable, do this in the model:
protected $guarded = [];
If you would like to make all attributes mass assignable, you may define the $guarded property as an empty array
https://laravel.com/docs/5.3/eloquent#mass-assignment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With