PHPackages                             synergitech/laravel-sweetalert - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. synergitech/laravel-sweetalert

Abandoned → [https://github.com/uxweb/sweet-alert](/?search=https%3A%2F%2Fgithub.com%2Fuxweb%2Fsweet-alert)ArchivedLibrary

synergitech/laravel-sweetalert
==============================

A PHP package to show Sweet Alerts with the Laravel Framework

0.0.2(7y ago)01732[3 issues](https://github.com/SynergiTech/laravel-sweetalert/issues)MITPHPPHP &gt;=7.0.0

Since Sep 21Pushed 7y ago3 watchersCompare

[ Source](https://github.com/SynergiTech/laravel-sweetalert)[ Packagist](https://packagist.org/packages/synergitech/laravel-sweetalert)[ RSS](/packages/synergitech-laravel-sweetalert/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Laravel SweetAlert
==================

[](#laravel-sweetalert)

*please note* this package has been abandoned, please use the [original package](https://github.com/uxweb/sweet-alert) for identical functionality or [our replacement package](https://github.com/synergitech/laravel-alert) for more flexible functionality
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#please-note-this-package-has-been-abandoned-please-use-the-original-package-for-identical-functionality-or-our-replacement-package-for-more-flexible-functionality)

This package integrates Twig with the standard Laravel 5 view framework. The package is based on [Easy Sweet Alert Messages for Laravel](https://github.com/uxweb/sweet-alert) by [Uziel Bueno](https://github.com/uxweb) but has been modified and refactored for our requirements.

Install
-------

[](#install)

First, install the package using Composer:

```
composer require synergitech/sweetalert

```

> Please note that this package works only alongside [SweetAlert](http://t4t5.github.io/sweetalert/).

Usage
-----

[](#usage)

### Facade

[](#facade)

First, import the Alert facade into your controller.

```
use Alert;
```

Then, use the facade methods to add your message.

- `Alert::message('Message', 'Optional Title');`
- `Alert::basic('Basic Message', 'Mandatory Title');`
- `Alert::info('Info Message', 'Optional Title');`
- `Alert::success('Success Message', 'Optional Title');`
- `Alert::error('Error Message', 'Optional Title');`
- `Alert::warning('Warning Message', 'Optional Title');`

### Helper Function

[](#helper-function)

The helper supports the same methods as the facade.

- `alert()->message('Message', 'Optional Title');`
- `alert()->basic('Basic Message', 'Mandatory Title');`
- `alert()->info('Info Message', 'Optional Title');`
- `alert()->success('Success Message', 'Optional Title');`
- `alert()->error('Error Message', 'Optional Title');`
- `alert()->warning('Warning Message', 'Optional Title');`
- `alert()->basic('Basic Message', 'Mandatory Title')->autoclose(3500);`

For a generic alert, you can just use `alert('Message')`, which has the same outcome as `alert()->message('Message')`.

### Rendering

[](#rendering)

#### Blade

[](#blade)

```
@if (Session::has('sweetalert.alert'))

        swal({!! Session::get('sweetalert.alert') !!});

@endif
```

#### Twig

[](#twig)

```
{% if session_has('sweetalert.alert') %}

        swal({{ session_get('sweetalert.alert')|raw }});

{% endif %}
```

The `sweetalert.alert` session key contains a JSON configuration object which can be passed directly to SweetAlert.

### Advanced Rendering

[](#advanced-rendering)

#### Blade

[](#blade-1)

```
@if (Session::has('sweetalert.alert'))

        swal({
            text: "{!! Session::get('sweetalert.text') !!}",
            title: "{!! Session::get('sweetalert.title') !!}",
            timer: {!! Session::get('sweetalert.timer') !!},
            type: "{!! Session::get('sweetalert.type') !!}",
            showConfirmButton: "{!! Session::get('sweetalert.showConfirmButton') !!}",
            confirmButtonText: "{!! Session::get('sweetalert.confirmButtonText') !!}",
            confirmButtonColor: "#AEDEF4"
        });

@endif
```

#### Twig

[](#twig-1)

```
{% if session_has('sweetalert.alert') %}

        swal({
            text: "{{ Session::get('sweetalert.text')|raw }}",
            title: "{{ Session::get('sweetalert.title')|raw }}",
            timer: {{ Session::get('sweetalert.timer')|raw }},
            type: "{{ Session::get('sweetalert.type')|raw }}",
            showConfirmButton: "{{ Session::get('sweetalert.showConfirmButton')|raw }}",
            confirmButtonText: "{{ Session::get('sweetalert.confirmButtonText')|raw }}",
            confirmButtonColor: "#AEDEF4"
        });

{% endif %}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Total

2

Last Release

2856d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d69f33cc173ab9f35c67cb1bbaabeb0b705f983f65253393525ccfc539abc260?d=identicon)[SynergiTech](/maintainers/SynergiTech)

---

Top Contributors

[![uxweb](https://avatars.githubusercontent.com/u/5134732?v=4)](https://github.com/uxweb "uxweb (110 commits)")[![uziel-bueno](https://avatars.githubusercontent.com/u/77310379?v=4)](https://github.com/uziel-bueno "uziel-bueno (9 commits)")[![jrean](https://avatars.githubusercontent.com/u/5646128?v=4)](https://github.com/jrean "jrean (8 commits)")[![KhaledSMQ](https://avatars.githubusercontent.com/u/8835798?v=4)](https://github.com/KhaledSMQ "KhaledSMQ (4 commits)")[![JoeriAben](https://avatars.githubusercontent.com/u/4263996?v=4)](https://github.com/JoeriAben "JoeriAben (2 commits)")[![vrajroham](https://avatars.githubusercontent.com/u/12662173?v=4)](https://github.com/vrajroham "vrajroham (2 commits)")[![georgeboot](https://avatars.githubusercontent.com/u/884482?v=4)](https://github.com/georgeboot "georgeboot (2 commits)")[![mmonbr](https://avatars.githubusercontent.com/u/3525566?v=4)](https://github.com/mmonbr "mmonbr (1 commits)")[![ronydebnath](https://avatars.githubusercontent.com/u/10370201?v=4)](https://github.com/ronydebnath "ronydebnath (1 commits)")[![ssfinney](https://avatars.githubusercontent.com/u/1596394?v=4)](https://github.com/ssfinney "ssfinney (1 commits)")[![tomopongrac](https://avatars.githubusercontent.com/u/25442485?v=4)](https://github.com/tomopongrac "tomopongrac (1 commits)")[![TortleWortle](https://avatars.githubusercontent.com/u/1979893?v=4)](https://github.com/TortleWortle "TortleWortle (1 commits)")[![al0mie](https://avatars.githubusercontent.com/u/5223895?v=4)](https://github.com/al0mie "al0mie (1 commits)")[![willpower232](https://avatars.githubusercontent.com/u/1619102?v=4)](https://github.com/willpower232 "willpower232 (1 commits)")[![davidcb](https://avatars.githubusercontent.com/u/1170269?v=4)](https://github.com/davidcb "davidcb (1 commits)")[![djsigfried56](https://avatars.githubusercontent.com/u/1375528?v=4)](https://github.com/djsigfried56 "djsigfried56 (1 commits)")[![forestlovewood](https://avatars.githubusercontent.com/u/22885049?v=4)](https://github.com/forestlovewood "forestlovewood (1 commits)")[![harry-synergi](https://avatars.githubusercontent.com/u/44359670?v=4)](https://github.com/harry-synergi "harry-synergi (1 commits)")[![JulienTant](https://avatars.githubusercontent.com/u/785518?v=4)](https://github.com/JulienTant "JulienTant (1 commits)")[![LespiletteMaxime](https://avatars.githubusercontent.com/u/2920479?v=4)](https://github.com/LespiletteMaxime "LespiletteMaxime (1 commits)")

---

Tags

laravelnotifieralertsweet

### Embed Badge

![Health badge](/badges/synergitech-laravel-sweetalert/health.svg)

```
[![Health](https://phpackages.com/badges/synergitech-laravel-sweetalert/health.svg)](https://phpackages.com/packages/synergitech-laravel-sweetalert)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k124.3M624](/packages/barryvdh-laravel-debugbar)[uxweb/sweet-alert

A simple PHP package to show Sweet Alerts with the Laravel Framework

8251.3M6](/packages/uxweb-sweet-alert)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[realrashid/sweet-alert

Laravel Sweet Alert Is A Package For Laravel Provides An Easy Way To Display Alert Messages Using The SweetAlert2 Library.

1.2k2.9M21](/packages/realrashid-sweet-alert)[mckenziearts/laravel-notify

Flexible flash notifications for Laravel

1.7k1.1M5](/packages/mckenziearts-laravel-notify)[prologue/alerts

Prologue Alerts is a package that handles global site messages.

3486.1M30](/packages/prologue-alerts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
