From b292b488acb4c31df52dc6380ee5aeee80996ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna-Sara=20S=C3=A9lea?= Date: Sat, 1 Nov 2025 18:06:00 +0100 Subject: [PATCH] Fixed widgets on admin view --- app/Filament/Widgets/PopularCategoryChart.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Filament/Widgets/PopularCategoryChart.php b/app/Filament/Widgets/PopularCategoryChart.php index 2750f6b..308fa53 100644 --- a/app/Filament/Widgets/PopularCategoryChart.php +++ b/app/Filament/Widgets/PopularCategoryChart.php @@ -32,11 +32,7 @@ class PopularCategoryChart extends ChartWidget // $categoryNames[] = $obj->name; //} - $items = Reserveditem::withTrashed()->with('item')->whereHas('item', function($query){ - return $query->where('type', 'game'); - })->get()->groupBy('item.category_id')->sortBy('item.category_id'); - - + $items = Reserveditem::withTrashed()->with('item')->get()->groupBy('item.category_id'); $itemCategoriesCount = []; foreach ($items as $item){