56 lines
1.4 KiB
PHP
56 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Helps;
|
|
|
|
use App\Filament\Clusters\Administration\AdministrationCluster;
|
|
use App\Filament\Resources\Helps\Pages\ListHelps;
|
|
use App\Filament\Resources\Helps\Schemas\HelpForm;
|
|
use App\Filament\Resources\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();
|
|
}
|
|
}
|