56 lines
1.5 KiB
PHP
56 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Events\RelationManagers;
|
|
|
|
use Filament\Actions\CreateAction;
|
|
use Filament\Actions\DeleteAction;
|
|
use Filament\Actions\EditAction;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Resources\RelationManagers\RelationManager;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Tables\Columns\TextColumn;
|
|
use Filament\Tables\Table;
|
|
|
|
class UserNoteRelationManager extends RelationManager
|
|
{
|
|
protected static string $relationship = 'user_notes';
|
|
|
|
protected static ?string $title = 'Allgemeinflächen';
|
|
|
|
protected static ?string $navigationLabel = 'Allgemeinflächen';
|
|
|
|
protected static ?string $modelLabel = 'Allgemeinflächen';
|
|
|
|
protected static ?string $pluralModelLabel = 'Allgemeinflächen';
|
|
|
|
public function form(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('event_id')
|
|
->required()
|
|
->maxLength(255),
|
|
]);
|
|
}
|
|
|
|
public function table(Table $table): Table
|
|
{
|
|
return $table
|
|
->recordTitleAttribute('event_id')
|
|
->columns([
|
|
TextColumn::make('event_id')
|
|
->searchable(),
|
|
])
|
|
->filters([
|
|
//
|
|
])
|
|
->headerActions([
|
|
CreateAction::make(),
|
|
])
|
|
->recordActions([
|
|
EditAction::make(),
|
|
DeleteAction::make(),
|
|
]);
|
|
}
|
|
}
|