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.
Link:
This post is submitted by our members. Submit a new post.
Tags: Tutorials Laravel 5 Laravel 5.2 Laravel 5.3 Laravel 5.1 Intermediate