Dave Wize's avatar

Accessor (laravel 10) to provide me with a json array

I want to define an Accessor (laravel 10) to provide me with a json array of some fields. And I'm not sure how to return an array of fields from an accessor in laravel 10

0 likes
1 reply
Dave Wize's avatar

It is super simple. You just return an array with all attributes[attribute name]

Please or to participate in this conversation.