wavey/sweetalert
Composer 安装命令:
composer require wavey/sweetalert
包简介
SweetAlert2 implementation for Laravel
README 文档
README
Sweetalerts is an Laravel implementation of the much loved Sweetalerts 2 package. Show your users some beautiful alerts when actions are performed in your Laravel application with some handy helpers.
⚡️ Quickstart
Install Sweetalert through composer and run our installer.
composer require wavey/sweetalert && php artisan sweetalert:install
Include the Sweetalert2 javascript and then include our sweetalert 2 components.
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script> @include('sweetalert::sweetalert')
📖 Usage
Before using Sweetalerts, you will need to include the sweetalert facade at the top of your controllers:
use Wavey\Sweetalert\Sweetalert;
Now you should have access to the Sweetalert facade inside your controllers. Their is many varients of the alerts you can use:
Sweetalert::basic('Description', 'Title'); Sweetalert::info('Description', 'Title'); Sweetalert::success('Description', 'Title'); Sweetalert::error('Description', 'Title'); Sweetalert::warning('Description', 'Title'); Sweetalert::message('Description', 'Title'); Sweetalert::message('Description <h2>Custom HTML</h2>', 'Title')->html();
⚠️ Limitations
- Currently this package doesn't work as expected from inside Livewire components, we are working on a fix for this and will be inside a later release. |
👍 Contribute
If you want to say thank you and/or support the active development of Sweetalerts:
- Add a GitHub Star to the project.
- Tweet about the project on your twitter.
- Write a review or tutorial on Medium, Dev.to or personal blog.
- Support the project by pleding through GitHub.
🛡️ Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
⚠️ License
Copyright (c) 2022-present Wavey Group and Contributors. Sweetalert is free and open-source software licensed under the MIT License.
wavey/sweetalert 适用场景与选型建议
wavey/sweetalert 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.89k 次下载、GitHub Stars 达 49, 最近一次更新时间为 2022 年 01 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「alerts」 「laravel」 「alert」 「sweetalert」 「sweet」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wavey/sweetalert 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wavey/sweetalert 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wavey/sweetalert 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Add visual alerts / warnings to Flarum posts
Laravel package for managing session messages and alerts in view responses
Bootstrap alerts
This module is designed to provide a special alerts feed block for Howard University
Yii bot for sending messages (alerts) to Slack
Alfabank REST API integration
统计信息
- 总下载量: 7.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 49
- 点击次数: 33
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-01-16