Refactor GroupResource to use a static property for navigation icon; add method documentation for name attribute in Group model.
This commit is contained in:
38
app/Filament/Resources/Hotels/Schemas/HotelForm.php
Normal file
38
app/Filament/Resources/Hotels/Schemas/HotelForm.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Hotels\Schemas;
|
||||
|
||||
use Filament\Forms;
|
||||
|
||||
class HotelForm
|
||||
{
|
||||
public static function schema(): array
|
||||
{
|
||||
return [
|
||||
Forms\Components\TextInput::make('name')
|
||||
->required(),
|
||||
|
||||
Forms\Components\Select::make('city')
|
||||
->options([
|
||||
'Makkah' => 'Makkah',
|
||||
'Madinah' => 'Madinah',
|
||||
])
|
||||
->required(),
|
||||
|
||||
Forms\Components\FileUpload::make('image')
|
||||
->image(),
|
||||
Forms\Components\FileUpload::make('images')
|
||||
->multiple(),
|
||||
Forms\Components\TextInput::make('geo_location'),
|
||||
|
||||
Forms\Components\TextInput::make('haram_distance')
|
||||
->required(),
|
||||
|
||||
Forms\Components\TextInput::make('star')
|
||||
->required()
|
||||
->numeric()
|
||||
->minValue(1)
|
||||
->maxValue(5),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user