Files
nuhodds_fi4/app/Filament/Clusters/StaticData/Resources/UbEvents/UbEventResource.php
T
2026-03-23 06:58:36 +01:00

49 lines
1.3 KiB
PHP

<?php
namespace App\Filament\Clusters\StaticData\Resources\UbEvents;
use App\Filament\Clusters\StaticData\Resources\UbEvents\Pages\ListUbEvents;
use App\Filament\Clusters\StaticData\Resources\UbEvents\Schemas\UbEventForm;
use App\Filament\Clusters\StaticData\Resources\UbEvents\Tables\UbEventsTable;
use App\Filament\Clusters\StaticData\StaticDataCluster;
use App\Models\UbEvent;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
class UbEventResource extends Resource
{
protected static ?string $model = UbEvent::class;
protected static string|BackedEnum|null $navigationIcon = 'icon-soccerball';
protected static ?string $navigationLabel = 'Events';
protected static ?string $cluster = StaticDataCluster::class;
protected static ?string $recordTitleAttribute = 'league_id';
public static function form(Schema $schema): Schema
{
return UbEventForm::configure($schema);
}
public static function table(Table $table): Table
{
return UbEventsTable::configure($table);
}
public static function getPages(): array
{
return [
'index' => ListUbEvents::route('/'),
];
}
public static function getNavigationBadge(): ?string
{
return parent::getEloquentQuery()->count();
}
}