Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

eloquent with select

Post::query()
    ->with(array('user' => function($query) {
        $query->select('id','username');
    }))
    ->get();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #eloquent #select
ADD COMMENT
Topic
Name
1+7 =