Toast Notifications for the TALL Stack

Packages

October 19th, 2021

toast-featured.png

TALL Toasts is a toast notification library for the Laravel TALL stack (Tailwind, Alpine.js, Laravel, Livewire). What makes this package stand out to me is the ability to render customizable toast messages from either the backend or frontend. The TALL Toasts package also has a negligable footprint on the published CSS/JS.

Here's the frontend API for triggering a toast message:

1// Frontend
2Toast.info(
3 'Notification from the frontend...',
4 'The Title'
5);
6 
7Toast.success('A toast without a title also works');
8 
9Toast.warning('Watch out!');
10 
11Toast.danger('I warned you!', 'Yikes');

And the same toast messages using PHP on the backend:

1// backend
2toast()
3 ->info('Notification from the backend...', 'The Title')
4 ->push();
5 
6toast()
7 ->success('A toast without a title also works')
8 ->push();
9 
10toast()
11 ->warning('Watch out!')
12 ->push();
13 
14toast()
15 ->danger('I warned you!', 'Yikes')
16 ->push();

In addition to this API, you have complete control over the look and feel of the messages by overriding the package's blade view with Tailwind classes:

TALL Toast light version

You can learn more about this package, get full installation instructions, and view the source code on GitHub.


This package was submitted to our Laravel News Links section. Links is a place the community can post packages and tutorials around the Laravel ecosystem. Follow along on Twitter @LaravelLinks

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.