54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Methodes;
|
|
|
|
use App\Filament\Clusters\Administration\AdministrationCluster;
|
|
use App\Filament\Resources\Methodes\Pages\ListMethodes;
|
|
use App\Filament\Resources\Methodes\Schemas\MethodeForm;
|
|
use App\Filament\Resources\Methodes\Tables\MethodesTable;
|
|
use App\Models\Methode;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class MethodeResource extends Resource
|
|
{
|
|
protected static ?string $model = Methode::class;
|
|
|
|
protected static ?string $cluster = AdministrationCluster::class;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Vorlagen';
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = 'lucide-calculator';
|
|
|
|
protected static ?string $navigationLabel = 'Methode';
|
|
|
|
protected static ?string $modelLabel = 'Methode';
|
|
|
|
protected static ?string $pluralModelLabel = 'Methoden';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return MethodeForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return MethodesTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListMethodes::route('/'),
|
|
];
|
|
}
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return parent::getEloquentQuery()->count();
|
|
}
|
|
}
|