How can I get Resource Form inside the action ->form ?
I have the following code:
I was wondering how would I get data from
I could do but not sure what to input as a Form variable here. Please advice what's the best approach in reusing form schema. Thanks.
6 Replies
I think it's
YourResource::form(new Form)->getFormSchema()
You could also just put it inside a static method that gets called from bothYou mean something like this?
Yes.
Cool π
If you donβt want a separate method, try version 1 π
Yeh, but I guess I would not need as many hiddenOn rules if I separate π
This can get complex to manage very fast. π