nidesky / sweet-alert
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: >=5.4.0
- illuminate/support: 5.0.*
This package is not auto-updated.
Last update: 2024-05-25 15:50:36 UTC
README
Base on t4t5/sweetalert
第一步:安装
composer require nidesky/sweet-alert
第二步:配置
// 打开 config/app.php // 在providers中添加 Nidesky\SweetAlert\SweetAlertServiceProvider::class, // 在alias中添加 'Alert' => Nidesky\SweetAlert\Facades\SweetAlert::class,
再执行
php artisan vendor:publish
第三步:使用
// 在控制器中调用 \Alert::success($title, $msg) // 在模板中调用 {!! Alert::css() !!} {!! Alert::js() !!} @include('sweetalert:sweetalert') // 如果只是在前端 swal("Good job!", "You clicked the button!", "success")