47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?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}'),
|
|
];
|
|
}
|
|
}
|