I have removed an element from the mass assignment array.
protected $guarded = ['id', 'status', 'org', 'params', 'last_visited_date'];
Because admin users need to be able to update the user model/record.
However now a user could pass through the element in a form and overwrite a field, this is undesirable.
What's the best way to tackle mass assignment on the mentioned user model?
Hopefully i dont have to have 2 user models?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire