realrashid/sweet-alert
Laravel package to integrate SweetAlert2 popups: stylish alerts, confirmations, toasts, and notifications. Trigger from controllers or views with simple helpers and session flashes, customize options, and improve UX with minimal setup.
alert()->success('SuccessAlert','Lorem ipsum dolor sit amet.');
alert()->info('InfoAlert','Lorem ipsum dolor sit amet.');
alert()->warning('WarningAlert','Lorem ipsum dolor sit amet.');
alert()->error('ErrorAlert','Lorem ipsum dolor sit amet.');
alert()->question('QuestionAlert','Lorem ipsum dolor sit amet.');
alert()->image('Image Title!','Image Description','Image URL','Image Width','Image Height','Image Alt');
alert()->html('<i>HTML</i> <u>example</u>',"
You can use <b>bold text</b>,
<a href='//github.com'>links</a>
and other HTML tags
",'success');
Set the Default Toast Position in
config/sweetalert.phpfile OR use theposition()helper method!
toast('Success Toast','success');
toast('Info Toast','info');
toast('Warning Toast','warning');
toast('Question Toast','question');
toast('Error Toast','error');
How can I help you explore Laravel packages today?