2017 © Pedro Peláez
 

library laravel-toastr

toastr.js for laravel 5.2

image

whossun/laravel-toastr

toastr.js for laravel 5.2

  • Sunday, July 10, 2016
  • by whossun
  • Repository
  • 2 Watchers
  • 4 Stars
  • 1,472 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

laravel-toastr

install

Using Composer, (*1)

composer require whossun/laravel-toastr

Add the service provider to config/app.php, (*2)

Whossun\Toastr\ToastrServiceProvider::class,

Optionally include the Facade in config/app.php if you'd like., (*3)

'Toastr'  => Whossun\Toastr\Facades\Toastr::class,

Options

You can set custom options for Reminder. Run:, (*4)

php artisan vendor:publish

to publish the config file for toastr., (*5)

You can see toastr's documentation to custom your need., (*6)

You can use toastr() function available., (*7)

Dependencies

jQuery toast, you need to add css and js to your html., (*8)

Basic

  • Toastr::info('message', 'title', ['options']);, (*9)

  • Toastr::success('message', 'title', ['options']);, (*10)

  • Toastr::warning('message', 'title', ['options']);, (*11)

  • Toastr::error('message', 'title', ['options']);, (*12)

  • Toastr::clear();, (*13)

  • Toastr()->info('message', 'title', ['options']);, (*14)

<?php

Route::get('/', function () {
    Toastr::success('Messages in here', 'Title', ["positionClass" => "toast-top-center"]);

    return view('welcome');
});

Then, (*15)

You should add {!! Toastr::message() !!} to your html., (*16)

<!DOCTYPE html>
<html>
    <head>
        <title>Laravel</title>
        <link rel="stylesheet" href="http://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css">
    </head>
    <body>
        <div class="container">
            <div class="content">
                <div class="title">Laravel 5</div>
            </div>
        </div>
        <script src="http://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
        <script src="http://cdn.bootcss.com/toastr.js/latest/js/toastr.min.js"></script>
        {!! Toastr::message() !!}
    </body>
</html>

MIT

The Versions

10/07 2016

dev-master

9999999-dev https://github.com/whossun/laravel-toastr

toastr.js for laravel 5.2

  Sources   Download

MIT

The Requires

 

by Avatar whossun

laravel php notification toastr

10/07 2016

1.0.1

1.0.1.0 https://github.com/whossun/laravel-toastr

toastr.js for laravel 5.2

  Sources   Download

MIT

The Requires

 

by Avatar whossun

laravel php notification toastr

10/07 2016

1.0.0

1.0.0.0 https://github.com/whossun/laravel-toastr

toastr.js for laravel 5.2

  Sources   Download

MIT

The Requires

 

by Avatar whossun

laravel php notification toastr