shamaseen's avatar

does getFooAttribute accessor still supported?

Laravel documentation no longer mention getFooAttribute accessor, but we are using it heavily in our project, we also can't move to use the attribute functions because we already have functions with these attribute names (we do something more like a relation, when calling the method return a build and calling the property return the value).

My question is, does getFooAttribute accessor still supported in Laravel 10, and will it be also supported in next versions?

0 likes
1 reply
jaseofspades88's avatar

Yes. It is still supported. It simply isn't documented because it's the older way of doing it but as always with Laravel, a lot of the obsolete ways of doing stuff are retained for legacy purposes.

Please or to participate in this conversation.