42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Clusters\StaticData\Resources\Players;
|
|
|
|
use App\Filament\Clusters\StaticData\Resources\Players\Pages\ListPlayers;
|
|
use App\Filament\Clusters\StaticData\Resources\Players\Schemas\PlayerForm;
|
|
use App\Filament\Clusters\StaticData\Resources\Players\Tables\PlayersTable;
|
|
use App\Filament\Clusters\StaticData\StaticDataCluster;
|
|
use App\Models\Player;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
|
|
class PlayerResource extends Resource
|
|
{
|
|
protected static ?string $model = Player::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = 'phosphor-person-simple-run';
|
|
|
|
protected static ?string $cluster = StaticDataCluster::class;
|
|
|
|
protected static ?string $recordTitleAttribute = 'name';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return PlayerForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return PlayersTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListPlayers::route('/'),
|
|
];
|
|
}
|
|
}
|