Files
hqland-app/app/Filament/Resources/FormTemplates/FormTemplateResource.php

44 lines
1.5 KiB
PHP

<?php
namespace App\Filament\Resources\FormTemplates;
use App\Filament\Resources\FormTemplates\Pages;
use App\Models\FormTemplate;
use App\Enums\NavigationGroup;
use Filament\Schemas\Schema;
use Filament\Resources\Resource;
use Filament\Tables\Table;
use App\Filament\Resources\FormTemplates\Schemas\FormTemplateForm;
use App\Filament\Resources\FormTemplates\Tables\FormTemplatesTable;
class FormTemplateResource extends Resource
{
protected static array $permissionActions = ["view", "create", "update", "delete", "restore", "forceDelete"];
protected static ?string $model = FormTemplate::class;
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-document-duplicate';
protected static string | \UnitEnum | null $navigationGroup = NavigationGroup::SETTING->value;
protected static ?int $navigationSort = 10;
protected static ?string $modelLabel = 'Biểu mẫu';
protected static ?string $pluralModelLabel = 'Biểu mẫu in ấn';
public static function form(Schema $schema): Schema
{
return FormTemplateForm::configure($schema);
}
public static function table(Table $table): Table
{
return FormTemplatesTable::configure($table);
}
public static function getPages(): array
{
return [
'index' => Pages\ListFormTemplates::route('/'),
'create' => Pages\CreateFormTemplate::route('/create'),
'edit' => Pages\EditFormTemplate::route('/{record}/edit'),
];
}
}