Ask Your Question
0

What is the actual purpose of the $fillable attribute?

asked 2023-03-26 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-03-22 02:00:00 +0000

scrum gravatar image

The $fillable attribute is a property in Laravel that allows developers to specify which attributes of a model should be mass assignable. This means that when using mass assignment methods like create or update, only the attributes listed in $fillable will be allowed to be updated in bulk. This is a security feature that helps prevent unintended modifications to sensitive attributes of a model.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-03-26 11:00:00 +0000

Seen: 17 times

Last updated: Mar 22 '23