projekte
This commit is contained in:
1 parent
0b1a1493b2
commit
527739b996
20 files changed
+546
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Projektes\Pages;
|
||||
|
||||
use App\Filament\Resources\Projektes\ProjekteResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateProjekte extends CreateRecord
|
||||
{
|
||||
protected static string $resource = ProjekteResource::class;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Projektes\Pages;
|
||||
|
||||
use App\Filament\Resources\Projektes\ProjekteResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditProjekte extends EditRecord
|
||||
{
|
||||
protected static string $resource = ProjekteResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Projektes\Pages;
|
||||
|
||||
use App\Filament\Resources\Projektes\ProjekteResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListProjektes extends ListRecords
|
||||
{
|
||||
protected static string $resource = ProjekteResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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\Tables\Table;
|
||||
|
||||
class ProjekteResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Projekte::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-drafting-compass';
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Projektes\Schemas;
|
||||
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class ProjekteForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
//
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Projektes\Tables;
|
||||
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class ProjektesTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
//
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user