Skip to main content
Back to packages
1,162 GitHub stars

realrashid/sweet-alert

View on GitHub

Description

A beautiful replacement for JavaScript's popup boxes for Laravel

Import Alert Facade first!

use RealRashid\SweetAlert\Facades\Alert;

or

Use Alert;

in your controller method

Alert::alert('Title', 'Message', 'Type');
Alert::success('Success Title', 'Success Message');
Alert::info('Info Title', 'Info Message');
Alert::warning('Warning Title', 'Warning Message');
Alert::error('Error Title', 'Error Message');
Alert::question('Question Title', 'Question Message');
Alert::image('Image Title!','Image Description','Image URL','Image Width','Image Height', 'Image Alt');
Alert::html('Html Title', 'Html Code', 'Type');
Alert::toast('Toast Message', 'Toast Type');

Recent Courses on Laravel Daily

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.