Please consider supporting us by just disabling your AD BLOCKER and reloading this page again. Accessors and mutators allow you to modify Eloquent attribute values when you fetch or set them on model instances. For Eg: If you would like to transform or manipulate data before storing or while fetching from the database tables than you can you Mutators and Accessors respectively.
To define a mutator, define a setFooAttribute method on your model where Foo is the "studly"(meaning every word first letter will be capital, Eg: first_name of table column will become FirstName) cased name of the column you wish to write. Eg: I want to add a mutator to lowercase the first_name column of my table while storing to table then we need to create setFirstNameAttribute() method in our model.