一个简单的 PHP 包,可在 Laravel 框架中显示 SweetAlerts
return Redirect::home(); }
Here are some examples on how you can use the facade:
php SweetAlert::message('消息', '可选标题'); SweetAlert::basic('基本消息', '必填标题'); SweetAlert::info('信息消息', '可选标题'); SweetAlert::success('成功消息', '可选标题'); SweetAlert::error('错误消息', '可选标题'); SweetAlert::warning('警告消息', '可选标题');
### 使用辅助函数
`alert($message = null, $title = '')`
除了之前列出的方法之外,您还可以直接使用 helper
无需指定任何消息类型即可调用该函数。这样做与以下代码相似:
`alert()->message('消息', '可选标题')`
就像使用 Facade 时一样,我们可以使用 th暂无开放 Issues,或尚未同步最近议题。