There is a way to use the form in relationship manager in my resource?

Or vice versa, use the form in my resource and the same form in my relationship manager. I have an panel /admin that controls beneficiaries. Beneficiaries have a hasMany relationship with Files. In BeneficiariesResource exists one FilesRelationManager. I also have another panel /beneficiaries, that only beneficiaries can access to upload their files. There is a way to use the FilesRelationManager form method in the FileResource? That way i dont need to have two separate forms (repeated code)
4 Replies
Lara Zeus
Lara Zeus2y ago
from the FilesRelationManager form() use FileResource::form($form)
cauexotico
cauexoticoOP2y ago
it worked thankss i tried the inverse and got an error about calling the method statically
Lara Zeus
Lara Zeus2y ago
didnt test the revers way, always better to use the main form resource
cauexotico
cauexoticoOP2y ago
that way worked

Did you find this page helpful?