Eloquente com selecionado
Post::query()
->with(array('user' => function($query) {
$query->select('id','username');
}))
->get();
Tiago F2
Post::query()
->with(array('user' => function($query) {
$query->select('id','username');
}))
->get();
$books = Book::with('author:id,name,book_id')->get();