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:
46
app/Filament/Resources/Programs/ProgramResource.php
Normal file
46
app/Filament/Resources/Programs/ProgramResource.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Programs;
|
||||
|
||||
use App\Filament\Resources\Programs\Schemas\ProgramForm;
|
||||
use App\Filament\Resources\Programs\Tables\ProgramsTable;
|
||||
use App\Models\Program;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class ProgramResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Program::class;
|
||||
|
||||
protected static ?string $navigationLabel = 'Programmalar';
|
||||
|
||||
protected static ?string $pluralLabel = 'Programmalar';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
protected static ?int $navigationSort = 7;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-calendar-days';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return ProgramForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return ProgramsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => Pages\ListPrograms::route('/'),
|
||||
'create' => Pages\CreateProgram::route('/create'),
|
||||
'edit' => Pages\EditProgram::route('/{record}/edit'),
|
||||
'view' => Pages\ViewProgram::route('/{record}'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user