2017 © Pedro Peláez
 

library toastr

这是一个基于toastr的提示框组件

image

chensuilong/toastr

这是一个基于toastr的提示框组件

  • Thursday, March 23, 2017
  • by wl496928838
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

laravel-toastr

Support laravel5.*, (*1)

toastr is a Javascript library for non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended., (*2)

Installation

Using Composer, (*3)

composer require csl/toastr

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

Csl\Toastr\ToastrServiceProvider::class,

Add the Facade in config/app.php, (*5)

'Toastr'  => Csl\Toastr\Toastr::class,

Usage

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

<link rel="stylesheet" href="http://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css">



{!! Toastr::message() !!}
Toastr::info('foo', 'bar');

Toastr::success('foo', 'bar');

Toastr::warning('foo', 'bar');

Toastr::error('foo', 'bar');

Example

<?php

Route::get('/', function () {
    Toastr::success('Hi! this is Toastr', 'Hello', ["positionClass" => "toast-bottom-left"]);

    return view('welcome');
});
<!DOCTYPE html>
<html>
    <head>
        <title>Laravel</title>
        <link rel="stylesheet" href="http://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css">
    </head>
    <body>
        <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
        <script src="http://cdn.bootcss.com/toastr.js/latest/js/toastr.min.js"></script>
        {!! Toastr::message() !!}
    </body>
</html>

, (*7)

Config

If you need to modify the flash message partials, you can run:, (*8)

    php artisan vendor:publish

to publish the config file for config/toastr.php., (*9)

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

The Versions

23/03 2017

dev-master

9999999-dev

这是一个基于toastr的提示框组件

  Sources   Download

MIT

The Requires

 

by chensuilong

23/03 2017

1.0

1.0.0.0

这是一个基于toastr的提示框组件

  Sources   Download

MIT

The Requires

 

by chensuilong