PHP code example of jeybin / toastr
1. Go to this page and download the library: Download jeybin/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/ */
jeybin / toastr example snippets
\Jeybin\Toastr\Toastr::success('Your message here')->toast();
\Jeybin\Toastr\Toastr::error('Your error message here')->toast();
\Jeybin\Toastr\Toastr::warning('Your warning message here')->toast();
\Jeybin\Toastr\Toastr::info('Your info message here')->toast();
return \Jeybin\Toastr\Toastr::success('Hello world')->redirect($route);
return \Jeybin\Toastr\Toastr::success('Hello world')
->redirectStatusCode($statusCode)
->redirect($route);
return [
/**
* Time out in seconds
*/
'timeout'=>1000,
/**
* show close button
*/
'show_close_btn'=>true,
/**
* show progress bar
*/
'show_progress_bar'=>true,
/**
* Prevent showing duplicate notifications
*/
'prevent_duplicates'=>true,
/**
* Redirect status code default : 302
*/
'redirect_status_code'=>302
];
\Jeybin\Toastr\Toastr::success('message')
->closeBtn(false)
->progressBar(false)
->preventDuplicates(false)
->rtl(true)
->timeOut(1500)
->toast();
bash
php artisan toastr:install