Learn how to append custom values to your Eloquent Model’s results in Laravel 5
INANI El Houssain wrote a nice tutorial on how to append custom values to our Eloquent Model’s results.
Today I’m going to show you one of the, let us say, not well known features of Eloquent models. about appending values that do not exist in the corresponding table of the model.
Yesterday I was playing a little bit about Laravel and VueJs, a simple loop over a model using VueJs’s directive. and I was facing a case I never came across before, I had to print the line containing the information about the Post model and also how many comments have.
This post is submitted by INANI El Houssain.
This post is submitted by one of our members. You may submit a new post here.