mirror of
https://github.com/anna-sara/filament_inventory
synced 2025-12-24 09:57:14 +01:00
Fixed widgets on admin view
This commit is contained in:
parent
7062c98853
commit
b292b488ac
1 changed files with 1 additions and 5 deletions
|
|
@ -32,11 +32,7 @@ class PopularCategoryChart extends ChartWidget
|
||||||
// $categoryNames[] = $obj->name;
|
// $categoryNames[] = $obj->name;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
$items = Reserveditem::withTrashed()->with('item')->whereHas('item', function($query){
|
$items = Reserveditem::withTrashed()->with('item')->get()->groupBy('item.category_id');
|
||||||
return $query->where('type', 'game');
|
|
||||||
})->get()->groupBy('item.category_id')->sortBy('item.category_id');
|
|
||||||
|
|
||||||
|
|
||||||
$itemCategoriesCount = [];
|
$itemCategoriesCount = [];
|
||||||
|
|
||||||
foreach ($items as $item){
|
foreach ($items as $item){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue