mercredi 3 mai 2017

How to dynamically create mutators in Laravel Eloquent Models?

I have a list of date fields, and all of them have the same logic in the mutator. I would like to extract this functionality to a trait so that in the future all I would need is to create an array of date fields in the model and use the trait.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire