839891627 / toastr-for-laravel5 by arvin

toastr.js for laravel5
25
0
2
Package Data
Maintainer Username: arvin
Maintainer Contact: arvin.cao@sunallies.com (arvin)
Package Create Date: 2017-03-27
Package Last Update: 2017-03-27
Language: PHP
License: MIT
Last Refreshed: 2025-02-09 15:04:07
Package Statistics
Total Downloads: 25
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

README

Installation

  1. Run composer require arvin/toastr-for-laravel
  2. Add Arvin\Toastr\ToastrServiceProvider::class, to providers in config/app.php
  3. Add 'Toastr' => Arvin\Toastr\Facades\Toastr::class, to aliases in config/app.php
  4. Run php artisan vendor:publish

Usage

Just add this code to your blade template file:

{!! Toastr::render() !!}

Use these methods in controllers:

Toastr::warning($message, $title = null, $options = []) 
Toastr::error($message, $title = null, $options = []) 
Toastr::info($message, $title = null, $options = [])
Toastr::success($message, $title = null, $options = [])
Toastr::clear() 

Config

set the toaster options in config/toastr.php , available options => toastr.js demo