Get Specific Columns Using “With()” Function in Laravel Eloquent
I have two tables, User
and Post
. One User
can have many posts
and one post
belongs to only one user
.
In my User
model I have a hasMany
relation…
When I use..
Post::with('user')->get(array('columns'....));
