65 lines
1.8 KiB
PHP
65 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Projektes;
|
|
|
|
use App\Filament\Clusters\Projekte\ProjekteCluster;
|
|
use App\Filament\Resources\Projektes\Pages\CreateProjekte;
|
|
use App\Filament\Resources\Projektes\Pages\EditProjekte;
|
|
use App\Filament\Resources\Projektes\Pages\ListProjektes;
|
|
use App\Filament\Resources\Projektes\Schemas\ProjekteForm;
|
|
use App\Filament\Resources\Projektes\Tables\ProjektesTable;
|
|
use App\Models\Projekte;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
|
|
class ProjekteResource extends Resource
|
|
{
|
|
protected static ?string $model = Projekte::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
|
|
|
// protected static ?string $cluster = ProjekteCluster::class;
|
|
|
|
protected static ?string $recordTitleAttribute = 'interner_name';
|
|
|
|
protected static ?string $navigationLabel = 'Projekte';
|
|
|
|
protected static ?string $modelLabel = 'Projekte';
|
|
|
|
protected static ?string $pluralModelLabel = 'Projekte';
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return ProjekteForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return ProjektesTable::configure($table);
|
|
}
|
|
|
|
public static function getRelations(): array
|
|
{
|
|
return [
|
|
//
|
|
];
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListProjektes::route('/'),
|
|
'create' => CreateProjekte::route('/create'),
|
|
'edit' => EditProjekte::route('/{record}/edit'),
|
|
];
|
|
}
|
|
|
|
public static function getNavigationBadge(): ?string
|
|
{
|
|
return parent::getEloquentQuery()->count();
|
|
}
|
|
}
|