Easily Add SweetAlert into Laravel Application

  Рет қаралды 43,309

Laravel Daily

Laravel Daily

Күн бұрын

Package review, with tutorial how to make alert "global" in Controllers and Constructors.
Package link: github.com/rea...
- - - -
I'm available for freelance Laravel work, check out my Upwork profile: bit.ly/povilas-...
- - - -
Our daily Laravel blog: laraveldaily.com
Our 50+ Laravel tips in a FREE e-book: bit.ly/laravel-...
Enroll in our online courses: bit.ly/laravel-...
Try our QuickAdminPanel code generator: bit.ly/quickadm...
Follow us on Twitter: bit.ly/twitter-...

Пікірлер: 40
@RashidAli-pb9lr
@RashidAli-pb9lr 5 жыл бұрын
Hi, First of all thank you for the wonderful review! I am the author of this package, i think you forgot the middleware that's come with this package with the help of middleware you don't need to create constructor in extended controller also there's no need for if statement too. Using the Middleware First thing first Let register the middleware in web middleware groups by simply adding the middleware class \RealRashid\SweetAlert\ToSweetAlert::class, into the $middlewareGroups of your app/Http/Kernel.php class. Examples Now within your controllers, just set your return message and send the proper message and proper type. public function FunctionName(Request $request) { return redirect('index')->with('success', 'Task Created Successfully!'); // OR return redirect('index')->withSuccess('Task Created Successfully!'); } for more info check out the documentation middleware section. realrashid.github.io/sweet-alert/
@LaravelDaily
@LaravelDaily 5 жыл бұрын
Thanks a lot Rashid! I've pinned your comment on top of all the comments so people would see that important information, sorry I missed it, maybe it wasn't that clear from the documentation.
@RashidAli-pb9lr
@RashidAli-pb9lr 5 жыл бұрын
@@LaravelDaily in next release i will make documentation more clear. I am also adding cdn support and more helper methods.
@erenergul1772
@erenergul1772 4 жыл бұрын
@@RashidAli-pb9lr How do you handle delete confirmation from Controller ? How do we handle it with that package ? I didn't find any proper answer all over internet.
@judeartthaddeuslamberang6156
@judeartthaddeuslamberang6156 2 жыл бұрын
@@erenergul1772 up
@sugumar.v3962
@sugumar.v3962 2 жыл бұрын
thank you rashid ali bhai for adding sweat alert
@elfkampher
@elfkampher 5 жыл бұрын
how do you handle a confirmation or cancel button whit this?
@ariel5515
@ariel5515 5 жыл бұрын
Wow thats really cool, Personally I love to use SweetAlert2 and Javascript it´s so cool, but definitely this way it´s much cleaner, thanks! you always have great tuts!
@mosesket
@mosesket 3 ай бұрын
can it be used in livewire, like can the middleware work in livewire validation
@rh3lix
@rh3lix 5 жыл бұрын
The other way to validate the session is in your master layout file. So you can validate if the sesion is success/error then display the message by firing the Alert function. For me it is more simple than touching the base controller + middleware thing. :)
@PovilasKorop
@PovilasKorop 5 жыл бұрын
Yes but then you can't do "use Alert;" and need to add all path \Something\Something\Alert::success('', '') which doesn't feel convenient either. That's kind of the whole point of this package - to not touch front-end, and perform all logic only in back-end files.
@johnwesley2090
@johnwesley2090 Жыл бұрын
hi. does this work in laravel 10.
@sugumar.v3962
@sugumar.v3962 2 жыл бұрын
thank you for the wonderful review!
@goncalo05
@goncalo05 3 жыл бұрын
Hy man, how can I change the fadeout time?
@extraordinary7660
@extraordinary7660 4 жыл бұрын
Thanks for the video.... but how we send email through sweetalert by clicked "ok"? thx
@softwareEngineerKunwar
@softwareEngineerKunwar 3 жыл бұрын
how to add sweet alert on laravel 8 and vue.js 3
@_kaan
@_kaan 5 жыл бұрын
Finally! thank you so much.
@ABHISHEKKUMAR-ne3rk
@ABHISHEKKUMAR-ne3rk 4 жыл бұрын
How we send otp in mobile or email
@devaes
@devaes 4 жыл бұрын
do you have vid for delete confirmation using that method ?
@PovilasKorop
@PovilasKorop 4 жыл бұрын
I don't have a video but you can google "sweetalert confirm", here's what I've found: stackoverflow.com/questions/31136889/how-to-use-confirm-using-sweet-alert
@shadowrealms2676
@shadowrealms2676 2 жыл бұрын
@@PovilasKorop Does this works with real rashid version?
@bibhasash7371
@bibhasash7371 4 жыл бұрын
Not working in my case...I have made a folder Backend inside my controllers folder and I created all necessary controllers in that Backend Folder... I'm Including it to my master.blade.php and do just like you but not working
@bibhasash7371
@bibhasash7371 4 жыл бұрын
Finally I did it
@samahaoum8688
@samahaoum8688 4 жыл бұрын
@@bibhasash7371 how
@bibhasash7371
@bibhasash7371 4 жыл бұрын
It worked
@samahaoum8688
@samahaoum8688 4 жыл бұрын
@@bibhasash7371 it woked for me too , but now i create another projet and when i display it , it doesnt it blocked my page
@teamadevelopment
@teamadevelopment 5 жыл бұрын
Now this is a really great help! KUDOS!!!!! :D
@bibhasash7371
@bibhasash7371 4 жыл бұрын
And I can't understand where exactly the error
@allacarini
@allacarini 3 жыл бұрын
Thanks a lot.
@josealberto5266
@josealberto5266 3 жыл бұрын
how can use this to delete confirm, i mean = ¿are you sure you want delete this item ¡?
@judeartthaddeuslamberang6156
@judeartthaddeuslamberang6156 2 жыл бұрын
yeah how should it work
@samahaoum8688
@samahaoum8688 4 жыл бұрын
it woked thank you
@vaiz151
@vaiz151 4 жыл бұрын
THANKS MASTER
@alexanderdera1266
@alexanderdera1266 5 жыл бұрын
Thanks
@sultankydyrkozha
@sultankydyrkozha 2 жыл бұрын
Misunderstandable, have a nice day!
@bevedel
@bevedel 4 жыл бұрын
Thank you for great tut!
Junior Code Review: Laravel Routes, Middleware, Validation and more
19:57
Laravel SweetAlert
11:43
Andre Madarang
Рет қаралды 49 М.
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 12 МЛН
didn't manage to catch the ball #tiktok
00:19
Анастасия Тарасова
Рет қаралды 33 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 23 МЛН
Laravel Roles and Permissions: All CORE Things You Need To Know
16:32
Laravel Daily
Рет қаралды 223 М.
Laravel: Change Two Symbols to Boost Eloquent Speed
6:34
Laravel Daily
Рет қаралды 86 М.
From Laravel Blade to Vue.js + API [Live-coding Example]
22:28
Laravel Daily
Рет қаралды 169 М.
How to Use Sweetalert2 with database MySQL + PHP Usage
18:48
Blessing Software
Рет қаралды 63 М.
Laravel Validation: 12 Less-Known Tips in 13 Minutes
13:11
Laravel Daily
Рет қаралды 38 М.
Laravel Migrations: 12 Useful Tips in 12 Minutes
12:06
Laravel Daily
Рет қаралды 80 М.
How to Upgrade Older Projects to Laravel 10
7:52
Laravel Daily
Рет қаралды 29 М.
Cypress Complete Beginners Masterclass 1 | Step by Step | Raghav Pal |
1:20:54
Automation Step by Step
Рет қаралды 205 М.
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 12 МЛН