From ef8ade1814a7dc8b0d146ed98c62c36b1b8bcb1a Mon Sep 17 00:00:00 2001 From: salam Date: Sat, 29 Aug 2026 08:44:30 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/Data/LoadEvents.php | 4 ++++ app/Filament/Widgets/Data/LoadEvents/LoadEventsQuery.php | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Filament/Widgets/Data/LoadEvents.php b/app/Filament/Widgets/Data/LoadEvents.php index aed1bb13..d2a2ec62 100644 --- a/app/Filament/Widgets/Data/LoadEvents.php +++ b/app/Filament/Widgets/Data/LoadEvents.php @@ -42,6 +42,10 @@ class LoadEvents $total_range = []; $match = StatisticFixtures::with('home')->with('away')->where('id', (int) $match_id)->first(); + if (! $match) { + return []; + } + if ($similar_past_matches != 'none') { $team_position = ''; diff --git a/app/Filament/Widgets/Data/LoadEvents/LoadEventsQuery.php b/app/Filament/Widgets/Data/LoadEvents/LoadEventsQuery.php index 2025c61c..a9c56ca0 100644 --- a/app/Filament/Widgets/Data/LoadEvents/LoadEventsQuery.php +++ b/app/Filament/Widgets/Data/LoadEvents/LoadEventsQuery.php @@ -128,8 +128,6 @@ class LoadEventsQuery ->orderBy('starttime', 'ASC') ->get(); - // dd($res); - $arr = []; foreach ($res as $value) { $tmp = [];