Sythe
Sythe
FFilament
Created by Sythe on 6/28/2024 in #❓┊help
Editing related models in their own Resource
I have a RelationManager in a Resource. The relation also has it's own resource, but I use the RelationManager for convienience, so it's easy to see which records are nested inside a model. Now I want the EditAction to redirect to it's own Resource page. I do it like this:
->actions([
Tables\Actions\Action::make('edit')->url(route('filament.admin.resources.modules.edit', ['record' => $record])),
Tables\Actions\DeleteAction::make(),
])
->actions([
Tables\Actions\Action::make('edit')->url(route('filament.admin.resources.modules.edit', ['record' => $record])),
Tables\Actions\DeleteAction::make(),
])
But $record is not the right variable. I tried several things, but I can't find the solution. Two questions: - Is this the right way to do, or is there a simpler solution? - What is the right variable?
4 replies