Refactor navigation icon declarations in various resources for consistency; enhance Group model with new relationships and fillable properties; update Hotel and Pilgrim models with fillable attributes; improve table configurations across resources.

This commit is contained in:
2025-09-03 19:10:21 +05:00
parent f9f4c476ce
commit e2b47eb73f
39 changed files with 634 additions and 53 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Filament\Resources\Hotels;
use App\Filament\Resources\Hotels\Pages\CreateHotel;
use App\Filament\Resources\Hotels\Pages\EditHotel;
use App\Filament\Resources\Hotels\Pages\ListHotels;
use App\Filament\Resources\Hotels\Pages\ViewHotel;
use App\Filament\Resources\Hotels\RelationManagers\RoomsRelationManager;
use App\Filament\Resources\Hotels\Schemas\HotelForm;
use App\Filament\Resources\Hotels\Tables\HotelsTable;
@@ -12,7 +13,6 @@ use App\Models\Hotel;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
class HotelResource extends Resource
@@ -22,13 +22,14 @@ class HotelResource extends Resource
protected static ?string $navigationLabel = 'Otellar';
protected static ?string $pluralLabel = 'Otellar';
protected static ?string $modelLabel = 'Otel';
protected static ?string $recordTitleAttribute = 'name';
protected static ?int $navigationSort = 5;
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-building-office';
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-building-office';
public static function form(Schema $schema): Schema
{
@@ -37,7 +38,9 @@ class HotelResource extends Resource
public static function table(Table $table): Table
{
return $table->columns(HotelsTable::schema());
return $table
->columns(HotelsTable::schema())
->actions(HotelsTable::actions());
}
public static function getRelations(): array
@@ -52,6 +55,7 @@ class HotelResource extends Resource
return [
'index' => ListHotels::route('/'),
'create' => CreateHotel::route('/create'),
'view' => ViewHotel::route('/{record}'),
'edit' => EditHotel::route('/{record}/edit'),
];
}