Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

is_it_a_bird's avatar

Sweet Alert for Laravel

Hi All,

I have just switched to laravel 11 and Im having trouble to get SweetAlert working (this particular package realrashid/sweet-alert)

Now they have removed the kernel etc etc I am not sure what and where to put the items as explained in the docs, has anybody else go this working with 11

Any help greatly appreciated

Thanks in advance

0 likes
3 replies
is_it_a_bird's avatar

Its ok I have sussed it, If anyone else is stuck I am just using it in my controller method ie

$data->save(); Alert::toast('### Added Successfully'); return redirect();

Snapey's avatar

There are no installation steps involving Kernel.php

is_it_a_bird's avatar

@Snapey Sorry I was referencing when using middleware:- "into the $middlewareGroups of your app/Http/Kernel.php file"

My bad for not fully explaining :o(

Please or to participate in this conversation.