In laravel, what is guarded attribute in a model?



In laravel, what is guarded attribute in a model?..

Answer / Vibhuti Pandey

In Laravel, a guarded attribute is a column that is protected from mass assignment. This means that when creating or updating a model instance, the values for these columns cannot be set through the fillable array. By default, all attributes are guarded, but you can override this by defining the $guarded property in your model.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What do you know about csrf token in laravel? How can someone turn off csrf protection for a specific route?

1 Answers  


How can we get the user's ip address in laravel?

1 Answers  


What do you mean by binding in laravel?

1 Answers  


How install react js in laravel?

1 Answers  


How to start laravel local development server.

1 Answers  


How can you display html with blade in laravel?

1 Answers  


What is route in laravel?

1 Answers  


What are the applications supported by valet?

1 Answers  


How to get configuration values in laravel?

1 Answers  


How to Sharing Data with all Views ?

2 Answers  


What is a Artisan command ?

1 Answers  


Exceptions are handled by which class?

1 Answers  


Categories