laravel pop alert
第一版
There are many flash message plugins for laravel, but I don’t want to like the tips of bootstrap, so I changed it a little and added some styles.
usage:
composer require bacao/alert
Then add app.php:
'providers' => [
...
BacaoAlertAlertProvider::class
]
Of course you can also add:
'aliases' => [
...
'Alert'=>BacaoAlertAlert::class
]
implement:
php artisan vendor:publish --provider="BacaoAlertAlertProvider"
The last page public part is added:
@include('bcalert::message')
demo (four styles are available):
user BacaoAlertAlert;
Alert::success('成功');
Alert::error('失败');
Alert::info('默认');
Alert::warning('警告');
at last! enjoy! 