diff --git a/app/Filament/Widgets/PopularCategoryChart.php b/app/Filament/Widgets/PopularCategoryChart.php index edd3154..5de1443 100644 --- a/app/Filament/Widgets/PopularCategoryChart.php +++ b/app/Filament/Widgets/PopularCategoryChart.php @@ -28,7 +28,7 @@ class PopularCategoryChart extends ChartWidget { $categories = Category::where('type', 'game')->get()->sortBy('id')->pluck('name'); - $items = Reserveditem::withTrashed()->with('item')->get()->groupBy('item.category_id')->sortByDesc('item.category_id'); + $items = Reserveditem::withTrashed()->with('item')->get()->groupBy('item.category_id')->sortBy('item.category_id', true); $itemCategoriesCount = []; foreach ($items as $item){