How to use Sweet Alert in Laravel Livewire

preview_player
Показать описание
A simple demo: two use-cases of SweetAlert JavaScript library in Livewire, utilizing Livewire events.

- - - - -
Support the channel by checking out our products:
Рекомендации по теме
Комментарии
Автор

Mr. Povilas thanks for teach this tool and his tips, very usefull for my growth like TALL developer, Regards from Chile!

fabrizziomorenor.
Автор

Thank you so much, by this way we can now use any toastr or any js library for showing none blocking notifications

TahirBhai
Автор

great time feeling! i implement sweetalert in my project yesterday :D

DanielŚmigiela
Автор

Lol that what I were making already and were going to send it to you 😅 will send it and make it more enhanched

hemantbhardwaj
Автор

I use alpineJs for these dialogs with livewire built-in listener.

nalorim
Автор

Hej 👋,
thanks for this video, it saved me a LOT of time 👍👍👍

saschapresnac
Автор

Love it! Thank you and have a nice weekend!

beatnu
Автор

A bigger question would be, is it possible to prompt the alert on redirect like we do with flashdata? Say, we delete a record in the Edit page; and after it's deleted successfully, we redirect to the index page and show the success alert there.

Also there's a library called livewire-alert which is pretty nifty.

suhpc
Автор

Thank you brother. How would you show error alert when record is not added form some reasons?

aliyubabayo
Автор

Very nice video. I did a couple of test and I would like to add something.
If I follow your method (adding a listener in the controller) the system is working but it's not reactive as I'd like. Very slow before opening the modal.
In my opinion GUI must react immediately to the click, than it can take some time for loading. But the user needs a feedback immediately.
So I tried to emit directly from the blade with the following command:
<button class="btn btn-sm text-warning text-hover-danger p-0" wire:click="$emit('triggerDelete', {{ $attachment->id }})">
and then in the javascript part there is the function triggerDelete.
In this way the system is very reactive.
There is something wrong in my method?

PaoloDellAquila
Автор

how to fire a css loader for the list of post after one post was added or deleted

aminmrd
Автор

Woahhhh, thanks for that information 🔥

Rivera-D
Автор

Sir make a video on livewire counter in bootstrap modal video. It didn't work properly I tried.

devintaspharma
Автор

What is the ".detail" in "event.detail.title"?

jeffersoncarvalho