Skip to content

arturslogins/toastr-for-laravel5

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

toastr.js for Laravel 5.*

Installation

  • Run composer require ryan/toastr-for-laravel

  • Add Yuansir\Toastr\ToastrServiceProvider::class, to providers in config/app.php

  • Add 'Toastr' => Yuansir\Toastr\Facades\Toastr::class, to aliases in config/app.php

  • 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

About

toastrjs for laravel5.*

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%