56 lines
1.6 KiB
PHP
56 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Inhaltsverzeichnis;
|
|
|
|
use App\Filament\Clusters\Administration\AdministrationCluster;
|
|
use App\Filament\Resources\Inhaltsverzeichnis\Pages\ListInhaltsverzeichnis;
|
|
use App\Filament\Resources\Inhaltsverzeichnis\Schemas\InhaltsverzeichnisForm;
|
|
use App\Filament\Resources\Inhaltsverzeichnis\Tables\InhaltsverzeichnisTable;
|
|
use App\Models\Inhaltsverzeichnis;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class InhaltsverzeichnisResource extends Resource
|
|
{
|
|
protected static ?string $model = Inhaltsverzeichnis::class;
|
|
|
|
protected static ?string $cluster = AdministrationCluster::class;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Vorlagen';
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = 'phosphor-list';
|
|
|
|
protected static ?string $navigationLabel = 'Inhaltsverzeichnis';
|
|
|
|
protected static ?string $modelLabel = 'Inhaltsverzeichnis';
|
|
|
|
protected static ?string $pluralModelLabel = 'Inhaltsverzeichnis';
|
|
|
|
protected static ?int $navigationSort = 1;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return InhaltsverzeichnisForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return InhaltsverzeichnisTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListInhaltsverzeichnis::route('/'),
|
|
];
|
|
}
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return parent::getEloquentQuery()->count();
|
|
}
|
|
}
|