A
A
Alexander Semikashev2019-06-29 21:03:57
Laravel
Alexander Semikashev, 2019-06-29 21:03:57

Is there an analogue of afterFind Yii2 in Laravel?

Yii2 ActiveReecord models have an afterFind method that allows me to change the data on the fly.
That is, in the database I have a serialized array, in afterFind I deserialize it. This is convenient because you don't have to do it all the time. Made in one place and everything.
Started working with Laravel and can't find the same from him. In which direction to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vism, 2019-06-29
@verng95

mutators or cast model parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question