Download the PHP package whereislucas/laravel-bootstrap-toasts without Composer
On this page you can find all versions of the php package whereislucas/laravel-bootstrap-toasts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download whereislucas/laravel-bootstrap-toasts
More information about whereislucas/laravel-bootstrap-toasts
Files in whereislucas/laravel-bootstrap-toasts
Package laravel-bootstrap-toasts
Short Description Bootstrap Laravel Flash Messages
License MIT
Informations about the package laravel-bootstrap-toasts
Bootstrap flash messages for your Laravel app
This package, based on laracasts/flash
provides an interface for Bootstrap 4.2 toast messages.
Installation
Get the package with composer
If you are not using Laravel 5.5 or higher, include the service provider within your config/app.php
file.
This package is made for Bootstrap 4.2 and higher, be sure to include the css and js files on your page.
Usage
First of all, include the snippet in your Blade templates
Then, in your controller, call the toast()
method to create a toast message.
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 level as "success".toast('Message')->info()
: Set the toast level as "info".toast('Message')->error()
: Set the toast level as "danger".-
toast('Message')->warning()
: Set the toast level as "warning". toast('Message')->title("Toast title")
: Set the toast title.toast('Message')->important()
: Add a close button to the toast.
Configuration & personalization
You can publish the configuration file to tweak the position of the toast or the default value for 'autohide'.
You can publish the view and tweak it if you want!