Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return self::with(['competitions' => function($query) use($date)
- {
- $query->whereHas('games', function($q) use($date){
- $q->whereHas('placard_game', function($q1) use($date){
- $q1->where('date', '=', $date)->where('api_sport_code','=','FOOT');
- })
- ->where('date', '=', $date);
- });
- }])
- ->whereHas('competitions', function($query) use($date) {
- $query->whereHas('games', function($q) use($date){
- $q->whereHas('placard_game', function($q1) use($date){
- $q1->where('date', '=', $date)->where('api_sport_code','=','FOOT');
- })
- ->where('date', '=', $date);
- });
- })
- ->orderBy('countries.order', 'ASC')
- ->orderBy('countries.name', 'ASC')
- ->get();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement