wire-elements / modal

Livewire component that provides you with a modal that supports multiple child modals while maintaining state.
MIT License
1.09k stars 129 forks source link

How to use wire:modal on the backend (Livewire controller) #452

Open nenadsijan opened 5 days ago

nenadsijan commented 5 days ago

Dear @PhiloNL This solution <button wire:modal="edit-user, @js(['user' => 1)">Open</button> works perfectly on the blade page, but how to use this wire:modal call 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