wip
This commit is contained in:
1 parent
5f95289079
commit
60249dffd9
37 files changed
+412
-458
No files matched your search
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Plans;
|
||||
|
||||
use App\Filament\Clusters\Administration\AdministrationCluster;
|
||||
use App\Filament\Resources\Plans\Pages\CreatePlan;
|
||||
use App\Filament\Resources\Plans\Pages\EditPlan;
|
||||
use App\Filament\Resources\Plans\Pages\ListPlans;
|
||||
use App\Filament\Resources\Plans\Schemas\PlanForm;
|
||||
use App\Filament\Resources\Plans\Tables\PlansTable;
|
||||
use App\Models\Plan;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class PlanResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Plan::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
|
||||
|
||||
protected static ?string $cluster = AdministrationCluster::class;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
||||
|
||||
protected static ?string $navigationLabel = 'Zahlungsplan';
|
||||
|
||||
protected static ?string $modelLabel = 'Zahlungsplan';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Zahlungspläne';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return PlanForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return PlansTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListPlans::route('/'),
|
||||
'create' => CreatePlan::route('/create'),
|
||||
'edit' => EditPlan::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->count();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user