27 lines
768 B
PHP
27 lines
768 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\MultilineSettings\Schemas;
|
|
|
|
use App\Models\Sport;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class MultilineSettingForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('name')->required(),
|
|
TextInput::make('short')->required(),
|
|
TextInput::make('table')->required(),
|
|
Select::make('sport_id')
|
|
->required()
|
|
->label('Sport')
|
|
->options(fn () => Sport::where('is_active', 1)->pluck('name', 'id')
|
|
->toArray()),
|
|
]);
|
|
}
|
|
}
|