refactoring into clusters
This commit is contained in:
1 parent
042a5a8b58
commit
48deb69379
97 files changed
+186
-198
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user