Level 73
You'll have to add them in the array:
protected $fillable = ['data', 'store_id', 'user_id', 'status'];
or use empty $guarded
protected $guarded = [];
but not both.
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a dataset like the below:
data --> come from postman/form
store_id --> come from postman/form
user_id --> not mandatory + come from postman/form
status --> not coming from postman/form but mandatory
protected $fillable = [];
I gave this but it's giving error that status is fillable.
In this case how will I confirm that status, data, store_id is fillable and user_id sometimes fillable?
Please or to participate in this conversation.