Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel query by relationship

//Added use $request for my needs

Event::whereHas('participants', function ($query) use ($request) {
    return $query->where('IDUser', '=', $request->find_IDUser);
})->get();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #query #relationship
ADD COMMENT
Topic
Name
4+5 =