julianwayu
CreateAction with form() how to use different model than the current one.
So I have a tasks table that lists different tasks and have actions that you can take on different resources. For example i have a task that it's "add track" and i have a form that creates tracks that i'm using in the manage tracks resource. I extracted it as a shared form and now i'm able to add it to this specific task as such:
When i click on the action button i get the following error
[object] (BadMethodCallException(code: 0): Call to undefined method App\Models\Task::trackArtists()
this is the track form schema:
I understand the problem and it's that the form its thinking that it needs to use the model from the current resource which is "tasks"
I tried something like this:
But not working.. am I missing something?
Is this possible to be able to tell the form on this action to use a different model?
Thanks3 replies
Hidden Action and action modal not opening. But if remove hidden the modal works
If i have a table and in the table i have actions that are hidden/visible based on some criteria. and the action is supposed to open a modal with a form, it's not opening the modal. I can see the request to the server to "open" modal but the modal does not open. If I remove the 'hidden" or 'visible' methods from the action, then the modal opens without a problem.
This code does NOT open modal
This code WORKS as expected
Please help. Thanks
38 replies
How to make table groups have a specific order?
For example, I'm grouping by status but i would like the groups to be listed in a specific order. Not asc/desc but maybe by a weight?
So lets say I have ASC: Completed, Draft, Pending,
I want to show the groups in this order: Draft, Pending, Completed
any way to do this?
2 replies