39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Pilgrims\Schemas;
|
|
|
|
use Filament\Forms\Components\DatePicker;
|
|
use Filament\Forms\Components\FileUpload;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class PilgrimForm
|
|
{
|
|
/**
|
|
* @param Schema $schema
|
|
* @return Schema
|
|
*/
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Select::make('group_id')
|
|
->relationship('group', 'id')
|
|
->required(),
|
|
TextInput::make('first_name')
|
|
->required(),
|
|
TextInput::make('last_name')
|
|
->required(),
|
|
DatePicker::make('birthdate')
|
|
->required(),
|
|
FileUpload::make('image')
|
|
->image(),
|
|
FileUpload::make('local_passport')
|
|
->downloadable(),
|
|
FileUpload::make('international_passport')
|
|
->downloadable(),
|
|
]);
|
|
}
|
|
}
|