How to use wire:modal on the backend (Livewire controller) #457
Unanswered
nenadsijan
asked this question in
Q&A
Replies: 2 comments
-
|
The back-end code remains unchanged, so the example you provided is the correct way. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
i thought about this as a solution to routing my modal. i added a function to my object controller that return the index page and defined it in web.php but i don't know how to dispatch the modal from the controller or to give like a token to the frontend to open a certain modal. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear @PhiloNL
This solution
<button wire:modal="edit-user, @js(['user' => 1)">Open</button>works perfectly on the blade page, but how to use thiswire:modalcall from Livewire controller ?Correctly for this scenario when i need to open new modal from backend.
$this->dispatch('modal.open', component: 'modals.edit-user', arguments: ['user' => 1]);Thanks in advance
Nenad
Beta Was this translation helpful? Give feedback.
All reactions