2017 © Pedro Peláez
 

library toastr-5-laravel

Easy toastr notifications for Laravel 5

image

oriceon/toastr-5-laravel

Easy toastr notifications for Laravel 5

  • Monday, April 30, 2018
  • by oriceon
  • Repository
  • 3 Watchers
  • 67 Stars
  • 42,471 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 27 Forks
  • 0 Open issues
  • 1 Versions
  • 63 % Grown

The README.md

toastr

Easy toastr.js notifications for Laravel 5, a ported version of Laravel 4 Toastr by kamaln7, (*1)

Installation

  1. Either run composer require oriceon/toastr-5-laravel or add "oriceon/toastr-5-laravel": "dev-master" to the require key in composer.json and run composer install
  2. Add 'Kamaln7\Toastr\ToastrServiceProvider', to the providers key in config/app.php (optional for Laravel 5.5)
  3. Add 'Toastr' => 'Kamaln7\Toastr\Facades\Toastr', to the aliases key in config/app.php (optional for Laravel 5.5)

Usage

Include jQuery and toastr.js in your master view template, and the output of Toastr::render() afterwards:, (*2)

``` html {!! Toastr::render() !!}, (*3)


Call one of these methods in your controllers to insert a toast: - `Toastr::warning($message, $title = null, $options = [])` - add a warning toast - `Toastr::error($message, $title = null, $options = [])` - add an error toast - `Toastr::info($message, $title = null, $options = [])` - add an info toast - `Toastr::success($message, $title = null, $options = [])` - add a success toast - `Toastr::add($type: warning|error|info|success, $message, $title = null, $options = [])` - add a toast - **`Toastr::clear()` - clear all current toasts** ### Setting custom Toastr options You can set custom options for Toastr. Run: ``` php php artisan vendor:publish

to publish the config file for Toastr. Then edit config/toastr.php and set the options array to whatever you want to pass to Toastr. These options are set as the default options and can be overridden by passing an array of options to any of the methods in the Usage section., (*4)

For a list of available options, see toastr.js' documentation., (*5)

The Versions

30/04 2018

dev-master

9999999-dev https://github.com/oriceon/toastr-5-laravel

Easy toastr notifications for Laravel 5

  Sources   Download

MIT

The Requires

 

by Kamal Nasser

laravel php notification toastr