PHP code example of manuelgeek / laravel-btoast
1. Go to this page and download the library: Download manuelgeek/laravel-btoast 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/ */
manuelgeek / laravel-btoast example snippets
// config/app.php
'providers' => array(
// ...
'Manuelgeek\LaravelBtoast\BToastServiceProvider',
),
// ...
'aliases' => array(
// ...
'BToast' => 'Manuelgeek\LaravelBtoast\Facades\BToast',
),
return [
'animation' => false,
'autohide' => true,
'delay' => 4000,
'position' => 'top-right', // top-left, bottom-right, bottom-left, center,bottom-center, top-center
];
BToast::message('message', 'level', 'title');
toast()->message('message', 'level', 'title');
toast('message', 'title');
BToast::info('message', 'title', 'subtitle');
btoast()->info('message', 'title', 'subtitle');
BToast::success('message', 'title', 'subtitle');
btoast()->success('message', 'title', 'subtitle');
BToast::error('message', 'title', 'subtitle');
btoast()->error('message', 'title', 'subtitle');
BToast::warning('message', 'title', 'subtitle');
btoast()->warning('message', 'title', 'subtitle');
BToast::light('message', 'title', 'subtitle');
btoast()->light('message', 'title', 'subtitle');
BToast::dark('message', 'title', 'subtitle');
btoast()->dark('message', 'title', 'subtitle');
BToast::secondary('message', 'title', 'subtitle');
btoast()->secondary('message', 'title', 'subtitle');
BToast::clear();
btoast()->clear();