Skip to content
Emeka Mbah edited this page May 20, 2023 · 7 revisions

Notify Alert

The notify alert provides some fluent methods for displaying notification messages.

Features

Notify title

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 />

Sticky message

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()

Notify Position

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();

Notify levels

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();
Clone this wiki locally