bacao / alert

laravel 提示

v1.0 2018-04-23 03:27 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:29:25 UTC


README

laravel有很多flash消息插件,但不喜欢bootstrap的提示风格,所以稍微修改了一下,加了一些别的样式

用法:

composer require bacao/alert

然后在app.php中添加:

'providers' => [
    ...
    Bacao\Alert\AlertProvider::class
 ]

当然也可以添加:

'aliases' => [
    ...
    'Alert'=>Bacao\Alert\Alert::class
]

执行:

php artisan vendor:publish --provider="Bacao\Alert\AlertProvider"

最后在页面的公共部分添加:

@include('bcalert::message')

demo(可以选择四种样式)

user Bacao\Alert\Alert;
Alert::success('成功');
Alert::error('失败');
Alert::info('默认');
Alert::warning('警告');

最后!享受吧!
image