Files
RomhackPlaza/app/Filament/Resources/Platforms/PlatformResource.php
2026-05-20 18:25:15 +02:00

51 lines
1.3 KiB
PHP

<?php
namespace App\Filament\Resources\Platforms;
use App\Filament\Resources\Platforms\Pages\CreatePlatform;
use App\Filament\Resources\Platforms\Pages\EditPlatform;
use App\Filament\Resources\Platforms\Pages\ListPlatforms;
use App\Filament\Resources\Platforms\Schemas\PlatformForm;
use App\Filament\Resources\Platforms\Tables\PlatformsTable;
use App\Models\Platform;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
class PlatformResource extends Resource
{
protected static ?string $model = Platform::class;
protected static string|BackedEnum|null $navigationIcon = Heroicon::Cube;
protected static ?string $recordTitleAttribute = 'name';
public static function form(Schema $schema): Schema
{
return PlatformForm::configure($schema);
}
public static function table(Table $table): Table
{
return PlatformsTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListPlatforms::route('/'),
'create' => CreatePlatform::route('/create'),
'edit' => EditPlatform::route('/{record}/edit'),
];
}
}