Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to use where relationship laravel

Event::with(["owner", "participants" => function($q) use($someId){
    $q->where('participants.IdUser', '=', 1);
    //$q->where('some other field', $someId);
}])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #relationship #laravel
ADD COMMENT
Topic
Name
7+7 =