From d351e6fb60b494ffe3abb19aec4446fcd38611b1 Mon Sep 17 00:00:00 2001 From: salam Date: Tue, 20 Jan 2026 08:43:29 +0100 Subject: [PATCH] wip --- app/Filament/Resources/Events/Tables/EventsTable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index 2aaaf80e..dc414d43 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -286,9 +286,9 @@ class EventsTable ->searchable() ->options(function (Get $get) { if ($get('country_id')) { - $res = Event::with('country')->with('group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('group_id')->get(); + $res = Event::with('country')->where('sport_id', $get('sport_id'))->with('group')->where('country_id', $get('country_id'))->where('starttime', '>', Carbon::now())->groupBy('group_id')->get(); } else { - $res = Event::with('country')->with('group')->where('starttime', '>', Carbon::now())->groupBy('group_id')->get(); + $res = Event::with('country')->where('sport_id', $get('sport_id'))->with('group')->where('starttime', '>', Carbon::now())->groupBy('group_id')->get(); } $arr = []; foreach ($res as $val) {