Saturday 9 May 2020

Lumen model extra attributes

Lumen php return extra model attribute

Laravel talks about the multators and asscessors, but I couldn't get it until I found the below link. Good one!

https://stackoverflow.com/questions/17232714/add-a-custom-attribute-to-a-laravel-eloquent-model-on-load



https://laravel.com/docs/7.x/eloquent-mutators

So, you can get "full_name" when it is not in the table column.


No comments:

Post a Comment