Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel relation select fields

public function user()
{
    return $this->belongsTo('User')->select(['id', 'username']);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #relation #select #fields
ADD COMMENT
Topic
Name
5+3 =