ListEvents::route('/'), ]; } public static function getNavigationBadge(): ?string { return parent::getEloquentQuery() ->where('starttime', '>', Carbon::now()) ->count(); } public static function getEloquentQuery(): Builder { $query = parent::getEloquentQuery() ->where('starttime', '>', Carbon::now()) ->with('competition_group') ->with('country') ->with('home') ->with('away'); if (in_array(1, EventsTable::$bettype_settings)) { $query->with('odds_3way.bookmaker'); } if (in_array(2, EventsTable::$bettype_settings)) { $query->with('odds_dc.bookmaker'); } if (in_array(3, EventsTable::$bettype_settings)) { $query->with('odds_dnb.bookmaker'); } if (in_array(4, EventsTable::$bettype_settings)) { $query->with('odds_ggng.bookmaker'); } if (in_array(5, EventsTable::$bettype_settings)) { $query->with('odds_tq.bookmaker'); } if (in_array(6, EventsTable::$bettype_settings)) { $query->with('odds_total.bookmaker'); } return $query; } }