Initial commit
This commit is contained in:
29
app/Filament/Resources/Games/Schemas/GameForm.php
Normal file
29
app/Filament/Resources/Games/Schemas/GameForm.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Games\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class GameForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('slug')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Select::make('platform_id')
|
||||
->relationship('platform', 'name')
|
||||
->required(),
|
||||
Select::make('genre_id')
|
||||
->relationship('genre', 'name')
|
||||
->required(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user