Files
2026-05-13 10:10:48 +02:00

56 lines
1.4 KiB
PHP

<?php
namespace App\Filament\Clusters\Verwaltung\Helps;
use App\Filament\Clusters\Administration\AdministrationCluster;
use App\Filament\Clusters\Verwaltung\Helps\Pages\ListHelps;
use App\Filament\Clusters\Verwaltung\Helps\Schemas\HelpForm;
use App\Filament\Clusters\Verwaltung\Helps\Tables\HelpsTable;
use App\Models\Help;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
use UnitEnum;
class HelpResource extends Resource
{
protected static ?string $model = Help::class;
protected static ?string $cluster = AdministrationCluster::class;
protected static string|UnitEnum|null $navigationGroup = 'Hilfen';
protected static string|BackedEnum|null $navigationIcon = 'phosphor-question';
protected static ?string $navigationLabel = 'Hilfe';
protected static ?string $modelLabel = 'Hilfe';
protected static ?string $pluralModelLabel = 'Hilfen';
protected static ?int $navigationSort = 5;
public static function form(Schema $schema): Schema
{
return HelpForm::configure($schema);
}
public static function table(Table $table): Table
{
return HelpsTable::configure($table);
}
public static function getPages(): array
{
return [
'index' => ListHelps::route('/'),
];
}
public static function getNavigationBadge(): ?string
{
return parent::getEloquentQuery()->count();
}
}