Back to the Learning

Beep Beep. Subscription Required.

Laracasts is packed full with over 1,500 lessons just like this one.
Sign up to get full access or log in to your account and sit back.

Your Teacher | Jeffrey Way

https://laracasts.s3.amazonaws.com/avatars/jeffrey-avatar.jpg's avatar
Hi, I'm Jeffrey. I'm the creator of Laracasts and spend most of my days building the site and thinking of new ways to teach confusing concepts. I live in Orlando, Florida with my wife and two kids.

About This Episode

Published on Mar 3rd, 2021

If you need to toggle an Alpine modal from anywhere in your application, it might be useful to reach for an event-based approach. In this lesson, we'll add a $modals.show('modal-name') API for activating any registered modal. To allow for this, we'll dispatch an event on the window object, and then listen for it from our modal Blade component.

Discuss It

Back to Series Button