Open a modal from a livewire controller from a 3rd Blade


I have a livewire controller where I have an openModal() function that opens a Modal and creates a post from the blade.
What if I want to open the same modal from another Blade (dashboard) file and create a post.
Can this be done?

In worst case I would like to redirect on the posts page and pass isOpen=1 so the page will start with the modal visible.

Yes, you can make a CreatePostModal Livewire component that contains all of the logic to open the modal and create a post and then pop it where ever you need it.


Check out the Laravel Jetstream source code for a robust modal that will get you started.