20 lines
558 B
PHP
20 lines
558 B
PHP
<?php
|
|
|
|
namespace App\Filament\Widgets;
|
|
|
|
use App\Models\Product;
|
|
use App\Models\ProductInventory;
|
|
use App\Models\Spice;
|
|
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
|
|
use Filament\Widgets\StatsOverviewWidget\Stat;
|
|
|
|
class StatsOverview extends BaseWidget {
|
|
protected function getStats(): array {
|
|
return [
|
|
Stat::make('Produkte', Product::count())->description('angelegt'),
|
|
Stat::make('Inventar', ProductInventory::count())->description('Produkte'),
|
|
Stat::make('Rohstoffe', Spice::count())->description('angelegt'),
|
|
];
|
|
}
|
|
}
|