bacao / alert
laravel alert
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: >=5.5.9
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~5.7
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('警告');