-
Notifications
You must be signed in to change notification settings - Fork 4
Notify
Emeka Mbah edited this page May 20, 2023
·
7 revisions
The notify alert provides some fluent methods for displaying notification messages.
You can add a title to notify via the title method.
In the application
Alert::notify('Backup completed successfully')
->title('Backup Progress')
->flash()
In the blade
<x-alert-notify />
You can pass a message directly in the sticky method
Alert::sticky('Backup completed successfully')
->flash()
or via the message method
Alert::notify()
->message('You just completed your weekly goals')
->flash()
The position of the notify on the screen can be controlled by calling one of the available methods
Alert::notify()->centered()->flash();
Alert::notify()->topLeft()->flash();
Alert::notify()->topRight()->flash();
Alert::notify()->topCenter()->flash();
Alert::notify()->bottomLeft()->flash();
Alert::notify()->bottomRight()->flash();
Alert::notify()->bottomCenter()->flash();
The notify level is the color of the notify title. Choose from any of the following.
Alert::notify(...)->primary();
Alert::notify(...)->secondary();
Alert::notify(...)->success();
Alert::notify(...)->info();
Alert::notify(...)->error();
Alert::notify(...)->warning();
Alert::notify(...)->light();
Alert::notify(...)->dark();