Erster Upload
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?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'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user