Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/waveygroup/sweetalert
🍩 SweetAlert 2 Implementation for Laravel
https://github.com/waveygroup/sweetalert
alert alertdialog alerting composer composer-package laravel laravel-framework laravel-package laravel8 library package php sweetalert sweetalert2
Last synced: 25 days ago
JSON representation
🍩 SweetAlert 2 Implementation for Laravel
- Host: GitHub
- URL: https://github.com/waveygroup/sweetalert
- Owner: waveygroup
- License: mit
- Created: 2022-01-16T08:06:50.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T19:15:25.000Z (8 months ago)
- Last Synced: 2024-09-28T19:41:39.246Z (about 1 month ago)
- Topics: alert, alertdialog, alerting, composer, composer-package, laravel, laravel-framework, laravel-package, laravel8, library, package, php, sweetalert, sweetalert2
- Language: PHP
- Homepage: https://wavey.group
- Size: 32.2 KB
- Stars: 50
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
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.
```shell
composer require wavey/sweetalert && php artisan sweetalert:install
```Include the Sweetalert2 javascript and then include our sweetalert 2 components.
```php@include('sweetalert::sweetalert')
```## 📖 Usage
Before using Sweetalerts, you will need to include the sweetalert facade at the top of your controllers:
```php
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:
```php
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('DescriptionCustom HTML
', '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`:
1. Add a [GitHub Star](https://github.com/waveygroup/sweetalert/stargazers) to the project.
2. Tweet about the project on your twitter.
3. Write a review or tutorial on [Medium](https://medium.com/), [Dev.to](https://dev.to/) or personal blog.
4. Support the project by pleding through [GitHub](https://github.com/sponsors/waveygroup).
## 🛡️ Security VulnerabilitiesPlease review our [security policy](https://github.com/waveygroup/sweetalert/security/policy) on how to report security vulnerabilities.
## ⚠️ License
Copyright (c) 2022-present [Wavey Group](https://github.com/waveygroup) and [Contributors](https://github.com/waveygroup/sweetalert/graphs/contributors). `Sweetalert` is free and open-source software licensed under the [MIT License](https://github.com/waveygroup/sweetalert/blob/master/LICENSE.md).