base commit
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\DisciplinaryReports;
|
||||
|
||||
use App\Filament\Resources\DisciplinaryReports\Pages\CreateDisciplinaryReport;
|
||||
use App\Filament\Resources\DisciplinaryReports\Pages\EditDisciplinaryReport;
|
||||
use App\Filament\Resources\DisciplinaryReports\Pages\ListDisciplinaryReports;
|
||||
use App\Filament\Resources\DisciplinaryReports\Pages\ViewDisciplinaryReport;
|
||||
use App\Filament\Resources\DisciplinaryReports\Schemas\DisciplinaryReportForm;
|
||||
use App\Filament\Resources\DisciplinaryReports\Schemas\DisciplinaryReportInfolist;
|
||||
use App\Filament\Resources\DisciplinaryReports\Tables\DisciplinaryReportsTable;
|
||||
use App\Models\DisciplinaryReport;
|
||||
use BackedEnum;
|
||||
use UnitEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
class DisciplinaryReportResource extends Resource
|
||||
{
|
||||
protected static ?string $model = DisciplinaryReport::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedExclamationTriangle;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Records';
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'title';
|
||||
|
||||
protected static bool $isGloballySearchable = false;
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return DisciplinaryReportForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function infolist(Schema $schema): Schema
|
||||
{
|
||||
return DisciplinaryReportInfolist::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return DisciplinaryReportsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListDisciplinaryReports::route('/'),
|
||||
'create' => CreateDisciplinaryReport::route('/create'),
|
||||
'view' => ViewDisciplinaryReport::route('/{record}'),
|
||||
'edit' => EditDisciplinaryReport::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getRecordRouteBindingEloquentQuery(): Builder
|
||||
{
|
||||
return parent::getRecordRouteBindingEloquentQuery()
|
||||
->withoutGlobalScopes([
|
||||
SoftDeletingScope::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user