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 Zeus16mo ago
from the FilesRelationManager form() use FileResource::form($form)
cauexotico
cauexoticoOP16mo ago
it worked thankss i tried the inverse and got an error about calling the method statically
Lara Zeus
Lara Zeus16mo ago
didnt test the revers way, always better to use the main form resource
cauexotico
cauexoticoOP16mo ago
that way worked
Want results from more Discord servers?
Add your server