What is the use of accessors and mutators in eloquent?



What is the use of accessors and mutators in eloquent?..

Answer / Vinay Shankar Mani Tripathi

Accessors and mutators are methods defined on Eloquent models to automatically process data when reading from (accessors) or writing to (mutators) a database column. They help you format, manipulate, and encrypt/decrypt data before it's saved or retrieved.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What are events in laravel?

1 Answers  


What are named routes in laravel?

1 Answers  


What are the 3 service provider types?

1 Answers  


Explain elixir in laravel?

1 Answers  


how to create subdomain routing in laravel 5?

1 Answers  


What is route parameters in laravel?

1 Answers  


What is laravel trait?

1 Answers  


What is asset in laravel?

1 Answers  


How facades are different from dependency injection?

1 Answers  


In which directory controllers are kept in laravel?

1 Answers  


What is http / console kernels in laravel?

1 Answers  


Explain what is mvc architecture?

1 Answers  


Categories