laravel include some fields on relationships in query code example
Example: query relationships laravel and select some columns
Post::query()
->with(array('user' => function($query) {
$query->select('id','username');
}))
->get();