34 lines
950 B
PHP
34 lines
950 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Clients\Schemas;
|
|
|
|
use App\Models\Bookmaker;
|
|
use App\Models\Sport;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class ClientForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('name')
|
|
->required(),
|
|
TextInput::make('homepage')
|
|
->default(null),
|
|
Select::make('bookmaker')
|
|
->options(Bookmaker::query()->pluck('name', 'id'))
|
|
->multiple()
|
|
->preload()
|
|
->searchable(),
|
|
Select::make('sport')
|
|
->options(Sport::query()->pluck('name', 'id'))
|
|
->multiple()
|
|
->preload()
|
|
->searchable(),
|
|
]);
|
|
}
|
|
}
|