Answers for "how to use where relationship laravel"

PHP
3

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);
}])
Posted by: Guest on July-29-2020

Code answers related to "how to use where relationship laravel"

Browse Popular Code Answers by Language