diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index 7222c904..980ca8d2 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -195,7 +195,7 @@ class EventsTable ->options(function () { $res = Event::where('has_markets', 1) ->where('sport_id', auth()->user()->sport_id) - ->whereDate('starttime', '>=', Carbon::now()) + ->where('starttime', '>=', Carbon::now()) ->groupBy('country_id') ->pluck('country_id')->toArray(); @@ -219,7 +219,7 @@ class EventsTable ->with('country') ->with('competition_group') ->where('sport_id', auth()->user()->sport_id) - ->whereDate('starttime', '>', Carbon::now()) + ->where('starttime', '>', Carbon::now()) ->whereIn('country_id', $get('country_id')) ->groupBy('competition_group_id')->get(); } else { @@ -227,8 +227,8 @@ class EventsTable ->with('country') ->with('competition_group') ->where('sport_id', auth()->user()->sport_id) - ->whereDate('starttime', '>', Carbon::now()) - ->groupBy('competition_group_id')->get(); + ->where('starttime', '>', Carbon::now()) + ->groupBy('competition_group.id')->get(); } $arr = []; @@ -253,7 +253,7 @@ class EventsTable $res = Event::where('has_markets', 1) ->with('competition_group') ->where('sport_id', auth()->user()->sport_id) - ->whereDate('starttime', '>', Carbon::now()) + ->where('starttime', '>', Carbon::now()) ->groupBy('competition_group_id') ->get(); $arr = []; @@ -330,18 +330,18 @@ class EventsTable $end = Carbon::createFromDate($starttime_period['end']); return $query - ->whereDate('starttime', '>=', $from) - ->whereDate('starttime', '<=', $end); + ->where('starttime', '>=', $from) + ->where('starttime', '<=', $end); } elseif (isset($starttime_period['start'])) { $from = Carbon::createFromDate($starttime_period['start']); return $query - ->whereDate('starttime', '>=', $from); + ->where('starttime', '>=', $from); } elseif (isset($starttime_period['end'])) { $end = Carbon::createFromDate($starttime_period['end']); return $query - ->whereDate('starttime', '<=', $end); + ->where('starttime', '<=', $end); } } )->when(