kind()->explanation(); } protected function getHeaderActions(): array { return [ Action::make('create') ->label($this->kind()->createLabel()) ->visible(fn (): bool => ContentElementResource::editor()) ->schema([ TextInput::make('designation')->label('Bezeichnung')->required(), ]) ->action(function (array $data): void { $composition = null; $this->report(function () use ($data, &$composition): void { $composition = app(ContentService::class)->createComposition($data['designation'], $this->kind()); }, $this->kind()->label().' ist angelegt.'); if ($composition !== null) { $this->redirect(static::getResource()::getUrl('edit', ['record' => $composition])); } }), ]; } }