Download the PHP package queued/toasts without Composer
On this page you can find all versions of the php package queued/toasts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download queued/toasts
More information about queued/toasts
Files in queued/toasts
Package toasts
Short Description Toast notifications made simple, with easy installation and configuration for Laravel 5.5+
License MIT
Informations about the package toasts
Easy Toasts Notifications For Your Laravel App
This package is adapted from by Jeffrey Way. Display alerts in a fancy way. Toasts are a great way of informing users of a server side action.
Installation
Begin by pulling in the package through Composer.
This package is made for Bootstrap 4.2 and higher, be sure to include the css and js files on your page.
Usage
Put the necessary script call somewhere in your project. Either in your Blade file, or in your scripts file
Make sure you include the view in your Blade Template
Then, within your controllers, before you perform a redirect, make a call to the toast()
function.
The toast method accepts the title and level optional arguments :
There are a few quick methods to modify the toast:
toast('Message')->success()
: Set the toast theme to "success".toast('Message')->normal()
: A normal toast. (default)toast('Message')->error()
: Set the toast theme to "danger".toast('Message')->warning()
: Set the toast theme to "warning".toast('Message')->info()
: Set the toast theme to "info".toast('Message')->dark()
: Set the toast theme to "dark".toast('Message')->primary()
: Set the toast theme to "primary".toast('Message')->important()
: Add a close button to the toast.toast('Message')->title('Toast title')
: Set the toast title.toast('Message')->time('just now')
: Set the toast time in the right side of the headertoast('Message')->error()->important()
: Render a "danger" toast message that must be dismissed.
Example
Multiple Toasts
Need to flash multiple toasts to the session? No problem.
Configuration & personalization
You can publish this package to change some configuration defaults and the views.
The package view will now be located in the resources/views/vendor/toast/
directory, and the config will be in config/toasts.php
.