2017 © Pedro Peláez
 

library toast

Toastr notifications in laravel

image

roksta/toast

Toastr notifications in laravel

  • Thursday, February 1, 2018
  • by roksta
  • Repository
  • 1 Watchers
  • 3 Stars
  • 506 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 24 % Grown

The README.md

Toast

Simple toastr notifications for laravel, (*1)

Installation

Install this package via composer, (*2)

    composer require roksta/toast

Laravel auto-discovery will find the required service providers and aliases., (*3)

Toastr

Toastr is enabled by default via CDN., (*4)

Run, (*5)

php artisan vendor:publish --provider="Roksta\Toastr\ToastrServiceProvider"

to publish the package view in your resources/assets/vendor/roksta/toastr.blade.php, (*6)

Add @include('vendor.roksta.toastr') in your main view, under your jQuery file import eg,, (*7)

    <!DOCTYPE html>
    <html>
    <head>
        <title></title>
        <link rel="stylesheet" type="text/css" href="/css/app.css">
    </head>
    <body>
        <div id="app"></div>
        <script type="text/javascript" src="js/app.js"></script>
        @include('vendor.roksta.toastr')
    </body>
    </html>

Use

Use the helper function toast() to make the default notifiers., (*8)

    toast()->success('message', 'title');
    toast()->info('message', 'title');
    toast()->warning('message', 'title');
    toast()->error('message', 'title');

You may specify all the other options dictated by Toastr by adding the options method to your toast., (*9)

    toast()->success('message', 'title')->options([
        'timeOut' => 5000,
        'closeButton' => 1,
        'closeHtml' => '<button><i class="icon-off"></i></button>'
    ]);

Note that for boolean values such as closeButton => true should be expressed as 0 for false or 1 for true, (*10)

Licence

The package is provided under the MIT License., (*11)

The Versions

01/02 2018

dev-master

9999999-dev

Toastr notifications in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar roksta

alert notifications laravel notifications

26/04 2017

v1.0.0

1.0.0.0

Toastr notifications in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar roksta

alert notifications laravel notifications

27/10 2016

v0.1

0.1.0.0

Toastr notifications in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar roksta

alert notifications laravel notifications

27/10 2016

0.0.1

0.0.1.0

Toastr notifications in laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar roksta

alert notifications laravel notifications