Ho to link 3 related tables on one form? I

Hi! I have 3 tables - categories, posts and comments. And I need to press edit button in the category list and to see all fields of category and a table of posts below and when i press edit button i must see the form with posts and a table of comments and to be able to add and edit comment and post fields.
I tried to make a relation manager but it linked only categories and posts. but when i press edit button in posts table below category i see only fields of post, but not comments.
3 Replies
Patrick Boivin
Patrick Boivin16mo ago
You want to have a relation manager inside of the edit modal?
tarzan_pasha.
tarzan_pasha.OP16mo ago
yes, or without edit modal if it is possible - in the form.
Patrick Boivin
Patrick Boivin16mo ago
It won't be possible in the modal, but if you have a dedicated edit page for all resources, you can change the EditAction in the relation manager to a simple link. Something like this:
Action::make('editPost')
->url(fn ($record) => PostResource::getUrl('edit', ['record' => $record->id]));
Action::make('editPost')
->url(fn ($record) => PostResource::getUrl('edit', ['record' => $record->id]));
Want results from more Discord servers?
Add your server