57 lines
1.6 KiB
PHP
57 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Clusters\StaticData\Resources\StatistikoEvents;
|
|
|
|
use App\Filament\Clusters\StaticData\Resources\StatistikoEvents\Pages\ListStatistikoEvents;
|
|
use App\Filament\Clusters\StaticData\Resources\StatistikoEvents\Schemas\StatistikoEventsForm;
|
|
use App\Filament\Clusters\StaticData\Resources\StatistikoEvents\Tables\StatistikoEventsTable;
|
|
use App\Filament\Clusters\StaticData\StaticDataCluster;
|
|
use App\Models\StatistikoEvent;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class StatistikoEventsResource extends Resource
|
|
{
|
|
protected static ?string $model = StatistikoEvent::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = 'icon-soccerball';
|
|
|
|
protected static ?string $navigationLabel = 'Event';
|
|
|
|
protected static ?string $modelLabel = 'Events';
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Statistiko';
|
|
|
|
protected static ?string $cluster = StaticDataCluster::class;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return StatistikoEventsForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return StatistikoEventsTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListStatistikoEvents::route('/'),
|
|
];
|
|
}
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return parent::getEloquentQuery()->count();
|
|
}
|
|
|
|
public static function getNavigationBadgeColor(): ?string
|
|
{
|
|
return 'success';
|
|
}
|
|
}
|