realrashid/sweet-alert
Laravel wrapper for SweetAlert2 that makes it easy to show stylish alert, toast, and confirmation dialogs. Flash messages from controllers or middleware, with helpers for success/error/warning/info, custom options, and Blade support for quick integration.
Include 'sweetalert::alert' in master layout
[@include](https://github.com/include)('sweetalert::alert')
and run the below command to publish the package assets.
php artisan sweetalert:publish
note: The javascript library of sweetalert2 is already loaded and included in the view with the help of above command!
!> If you don't want to use pre-loaded sweetalert.all.js so you can use cdn.
Just pass the cdn variable to above included view like below example.
[@include](https://github.com/include)('sweetalert::alert', ['cdn' => "https://cdn.jsdelivr.net/npm/sweetalert2@9"])
How can I help you explore Laravel packages today?