public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')
->required()
->maxLength(255),
Textarea::make('description')
->required()
->maxLength(255),
TextInput::make('amount_in_euro')
->required()
->label("Amount")
->numeric(),
Select::make('purchaser')
->required()
->label('Purchaser')
->options(User::all()->pluck('name', 'id'))
->searchable(),
Select::make('status')
->label('Status')
->options(Status::all()->pluck('name', 'id'))
->searchable(),
DatePicker::make('date_of_purchase')
->required()
->displayFormat('d/m/Y'),
FileUpload::make('attachment')
->required()
->multiple()
->disk('public')
->storeFileNamesIn('attachment_file_names')
->enableDownload()
->maxSize(25600)
]);
}
public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')
->required()
->maxLength(255),
Textarea::make('description')
->required()
->maxLength(255),
TextInput::make('amount_in_euro')
->required()
->label("Amount")
->numeric(),
Select::make('purchaser')
->required()
->label('Purchaser')
->options(User::all()->pluck('name', 'id'))
->searchable(),
Select::make('status')
->label('Status')
->options(Status::all()->pluck('name', 'id'))
->searchable(),
DatePicker::make('date_of_purchase')
->required()
->displayFormat('d/m/Y'),
FileUpload::make('attachment')
->required()
->multiple()
->disk('public')
->storeFileNamesIn('attachment_file_names')
->enableDownload()
->maxSize(25600)
]);
}