Changing the record for the modal of a form/action
I have tried to edit another model in a resource (form) via an action with modal. Can someone tell me how I can change the record for the modal?
I have tried the following:
1. override
2. I tried
I have tried the following:
1. override
resolveDefaultClosureDependencyForEvaluationByName() method of the action. Did not work2. I tried
$this->mountUsing(fn (Form $form) => $form->model($myRecord)); to overwrite the record in the form object. So the modal opens without error but if you change something in the modal you get an error. (The error [TypeError] that the record has been changed to the wrong one again)