PHP code example of csl / toastr

1. Go to this page and download the library: Download csl/toastr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

csl / toastr example snippets


Csl\Toastr\ToastrServiceProvider::class,

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

<link rel="stylesheet" href="http://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css">
<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() !!}

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

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

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

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



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

    return view('welcome');
});

    php artisan vendor:publish