54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Textblocks;
|
|
|
|
use App\Filament\Clusters\Administration\AdministrationCluster;
|
|
use App\Filament\Resources\Textblocks\Pages\ListTextblocks;
|
|
use App\Filament\Resources\Textblocks\Schemas\TextblockForm;
|
|
use App\Filament\Resources\Textblocks\Tables\TextblocksTable;
|
|
use App\Models\Textblock;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class TextblockResource extends Resource
|
|
{
|
|
protected static ?string $model = Textblock::class;
|
|
|
|
protected static ?string $cluster = AdministrationCluster::class;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Vorlagen';
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = 'phosphor-article';
|
|
|
|
protected static ?string $navigationLabel = 'Textblock';
|
|
|
|
protected static ?string $modelLabel = 'Textblock';
|
|
|
|
protected static ?string $pluralModelLabel = 'Textblöcke';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return TextblockForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return TextblocksTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListTextblocks::route('/'),
|
|
];
|
|
}
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return parent::getEloquentQuery()->count();
|
|
}
|
|
}
|