Player mongodb
This commit is contained in:
1 parent
b362fdc15f
commit
8370836efd
11 files changed
+409
-2
No files matched your search
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\StaticData\Resources\UbPlayers;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\UbPlayers\Pages\ListUbPlayers;
|
||||
use App\Filament\Clusters\StaticData\Resources\UbPlayers\Schemas\UbPlayerForm;
|
||||
use App\Filament\Clusters\StaticData\Resources\UbPlayers\Tables\UbPlayersTable;
|
||||
use App\Filament\Clusters\StaticData\StaticDataCluster;
|
||||
use App\Models\UbPlayer;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class UbPlayerResource extends Resource
|
||||
{
|
||||
protected static ?string $model = UbPlayer::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'icon-soccerplayer';
|
||||
|
||||
protected static ?string $navigationLabel = 'Player';
|
||||
|
||||
protected static ?string $cluster = StaticDataCluster::class;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'giocatore';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return UbPlayerForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return UbPlayersTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListUbPlayers::route('/'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->count();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user