Relationship table on modal? or NEW action on table action page?

I managed to find out that if I create a Resource with -- generate --simple and add a RelationManager to it I will not see the Relation div.
After some struggling/searching/reading posts/searching tutorials... I recreated the Resource with --generate and registered the relation manager to it and I see the table with all functions. If I comment the
 'edit' => Pages\EditAgenti::route('/{record}/edit'),
the edit will move to a modal and I do not see the table anymore.

I need an option to add the RelationManager panel on the modal, or even better I want a custom action button on the view page that will open the create form and save to the relation's Model.
somethink like:
Action::make("add-new-to-relation's-model")

that will open a modal where I have what I configure in the relation's form.
Solution
Action::make('adauga')
                    ->label('Add container')
                    ->icon('heroicon-o-folder-plus')
                    ->form([
                        Forms\Components\TextInput::make('contracte_id')
                            ->default('1'),
                        Forms\Components\TextInput::make('container_tip')
                            ->required()
                            ->maxLength(255),
                          ])
                      ->action(function (array $data, Containere $container): void {
                          $container->contracte_id = $data['contracte_id'];
                          $container->container_tip = $data['container_tip'];
                          $container->save();
                      }),
Was this page helpful?