78 lines
2.3 KiB
PHP
78 lines
2.3 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Admin\Resources\CompanyHistoryItems;
|
|
|
|
use App\Filament\Admin\Resources\CompanyHistoryItems\Pages\CreateCompanyHistoryItem;
|
|
use App\Filament\Admin\Resources\CompanyHistoryItems\Pages\EditCompanyHistoryItem;
|
|
use App\Filament\Admin\Resources\CompanyHistoryItems\Pages\ListCompanyHistoryItems;
|
|
use App\Filament\Admin\Resources\CompanyHistoryItems\Schemas\CompanyHistoryItemForm;
|
|
use App\Filament\Admin\Resources\CompanyHistoryItems\Tables\CompanyHistoryItemsTable;
|
|
use App\Models\CompanyHistoryItem;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
|
|
|
class CompanyHistoryItemResource extends Resource
|
|
{
|
|
protected static ?string $model = CompanyHistoryItem::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-clock';
|
|
|
|
protected static ?int $navigationSort = 45;
|
|
|
|
public static function getNavigationGroup(): ?string
|
|
{
|
|
return __('company_history.navigation_group');
|
|
}
|
|
|
|
public static function getNavigationLabel(): string
|
|
{
|
|
return __('company_history.navigation_label');
|
|
}
|
|
|
|
public static function getModelLabel(): string
|
|
{
|
|
return __('company_history.model_label');
|
|
}
|
|
|
|
public static function getPluralModelLabel(): string
|
|
{
|
|
return __('company_history.plural_model_label');
|
|
}
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return CompanyHistoryItemForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return CompanyHistoryItemsTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListCompanyHistoryItems::route('/'),
|
|
'create' => CreateCompanyHistoryItem::route('/create'),
|
|
'edit' => EditCompanyHistoryItem::route('/{record}/edit'),
|
|
];
|
|
}
|
|
|
|
public static function getRecordRouteBindingEloquentQuery(): Builder
|
|
{
|
|
return parent::getRecordRouteBindingEloquentQuery()
|
|
->withoutGlobalScopes([
|
|
SoftDeletingScope::class,
|
|
]);
|
|
}
|
|
}
|