Accessor on demand but not on every results.

Posted 2 years ago by yu0307

Hi all, I was just wondering if it's even possible in laravel to append an accessor to every row of a result?

!!! Not using $appends in the model. That will append that accessor to every results!!!

I'm trying to do something like this:


as you can see, the accessor is appended to the result on a demand but not always and not to every results.

Thank you ~

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.