29 lines
763 B
PHP
29 lines
763 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Documents\Schemas;
|
|
|
|
use Filament\Forms\Components\FileUpload;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class DocumentForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
Select::make('pilgrim_id')
|
|
->relationship('pilgrim', 'last_name')
|
|
->searchable()
|
|
->preload()
|
|
->required(),
|
|
TextInput::make('title')
|
|
->required(),
|
|
FileUpload::make('file')
|
|
->required()
|
|
->downloadable(),
|
|
]);
|
|
}
|
|
}
|