codingwithrk / rk-sweet-alert
一个用于实现 SweetAlert 的 Laravel 包。
1.0.0
2024-09-04 15:43 UTC
Requires
- php: ^7.4|^8.0
- laravel/framework: ^8.0|^9.0|^10.0|^11.0
README
介绍
大家好,开发者,使用此包您可以显示甜美的警报。
如何安装
composer require codingwithrk/rk-sweet-alert
在 body 关闭标签之前添加此代码
<x-rk-sweet-alert/>
之后,在您的控制器中
session()->flash('rk-alert', [ 'title' => 'Are you sure?', 'text' => 'You won\'t be able to revert this!', 'icon' => 'warning', 'confirmButtonText' => 'Yes, delete it!', 'showCancelButton' => true, 'confirmButtonColor' => '#3085d6', 'cancelButtonColor' => '#d33', ]);
发布供应商配置文件
php artisan vendor:publish --provider="Codingwithrk\RkSweetAlert\RkSweetAlertServiceProvider" --tag="config"
许可证
这是一个开源软件,许可协议为 MIT 许可。