Global Modals with Livewire and Alpine.js

preview_player
Показать описание


Official site

Twitter
Рекомендации по теме
Комментарии
Автор

Perfect, just what I was looking for. Came for the content, got the content, delivered beautifully

catherinelijs
Автор

How to pass specific ID to show into the modal ?

lowelltebrero
Автор

i have been watching alex youtube video when you used to run his channel with his name and php academy man you have come a long way ahead

affanmajid
Автор

i add cancel button in the modal for my form modal, but when i click it the entire page reload

mzakkimahatir
Автор

Thank you for the awesome video. I'm just wondering how to handle the show and hide of the modal if the component is inside a for loop.

glensoncarlogalupo
Автор

Perfect ! This is what i was lookingfor, thanks man

owfprem
Автор

Thank you! Now, I don't mean to be greedy, but if you could or already have covered route model binding in this manner (getting into some of the core laravel concepts like extending a component to another). I've been working on this for a few days now and the component extension and placing the modal inside my base layout, vice my sub-layouts. In order to defeat emitting livewire events all over the place with functions like show_edit_user_modal to set the individual livewire modals show state to true.

I understand the concept of route model binding with a standard controller that has functions that resolve to a uri that is assigned that controller, then when a user goes to say, posts.index, it SHOULD return only that users posts according the the DB relations. But since livewire replaces the controller, do you simply place functions like index within the livewire component, then bind models from your livewire component via the example of a uri being:

Route::get ("/components/users/index", UserManagement::class)->middleware(['auth', 'isAdmin']).

I've been around the world with the docs, and am maybe just a tad bit more novice with laravel than I thought, but I understand the documentation while reading through it, but putting it to practice without having a brain to pick, or a solid example such as this one, has been proving very difficult.

Anyways, I doubt anyone will even read this far. If you did, thanks for giving me your time. cheers!

ericcraigen
Автор

Sure enough, Alex posts the exact thing I've been doing my head in for the past couple of days! How would one inject an ID to display an edit form for example? Thanks a bunch!

LenartMlinar
Автор

what's your vs code theme, I am gonna try this. it's looking cool

RahulKumar-rktf
Автор

Great, that's exactly what i needed. Thanks Alex.

martinbohm
Автор

It is beyond me why everyone claims to have reusable modals but they ALWAYS use the same template for how the modals slides in. It is so important to have different modal template but no modal package for Livewire is capable of delivering this. Of course it is nice to reuse the modal but not all modals can look the same. A burger menu modals looks different than a centered modal and different than a toast modal. If there is a way to create different base templates please tell me how. I am looking for a solution so desperately. Right now I am forced to use all the different modal packages out there just to have three modals with different position on screen and different slide-in animations.

MT-frtb
Автор

when adding this to a exiting project, I see the 'modal' flashing on page load - how to avoid?

steen_rabol
Автор

Awesome. Can you please make advanced CRUD using modal livewire?

OnlyJavascript
Автор

Now displaying a fucking modal become science. Wtf happened to show / hide modals in classic style!? Entagle my ass.

MrPatishpanj
Автор

its sound like ninja the web developeur

amindouale