Refactor GroupResource to use a static property for navigation icon; add method documentation for name attribute in Group model.

This commit is contained in:
2025-08-31 18:51:46 +05:00
parent 3e58524af7
commit f9f4c476ce
20 changed files with 547 additions and 5 deletions

View 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),
];
}
}