PHPackages                             lancewan/laravel5-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. lancewan/laravel5-sweetalert

ActiveLibrary

lancewan/laravel5-sweetalert
============================

sweetalert.js for laravel5.2

v1.0.1(10y ago)126MITPHPPHP &gt;5.5.9

Since Apr 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/lanceWan/laravel5-sweetalert)[ Packagist](https://packagist.org/packages/lancewan/laravel5-sweetalert)[ RSS](/packages/lancewan-laravel5-sweetalert/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

[SweetAlert.js](http://t4t5.github.io/sweetalert/) for laravel5
===============================================================

[](#sweetalertjs-for-laravel5)

Quick Installation
------------------

[](#quick-installation)

Begin by installing the package through Composer.

```
composer require lancewan/laravel-sweetalert=~1.0
```

**Or** add this code to `composer.json` file:

```
"lancewan/laravel5-sweetalert":"~1.0"
```

Once this operation is complete, simply add both the service provider and facade classes to your project's config/app.php file:

### Service Provider

[](#service-provider)

```
Lance\Sweet\SweetAlertServiceProvider::class,
```

### Facade

[](#facade)

```
'Sweet' => Lance\Sweet\Facade\Sweet::class,
```

**Run** `php artisan vendor:publish`

And that's it!

Usage
-----

[](#usage)

Usage is simple. Before redirecting to another page, simply call on Flash to set your desired `Sweet` message. There are a number of methods to assign different levels of priority (info, success, warning, and error).

### Success

[](#success)

```
Sweet::success($message, $title = '', $options = []);
```

### Info

[](#info)

```
Sweet::info($message, $title = '', $options = []);
```

### Warning

[](#warning)

```
Sweet::warning($message, $title = '', $options = []);
```

### Error

[](#error)

```
Sweet::error($message, $title = '', $options = []);
```

### Rendering

[](#rendering)

Just add this code to your blade template file:

```
{!! Sweet::render() !!}
```

Config
------

[](#config)

set the sweetAlert options in **config/sweet.php** , available options =&gt; [sweetAlert.js](http://t4t5.github.io/sweetalert/)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

3692d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/698e93fae61696c01b4887914a185311a6f7d81b5dabd25985433d51e7a801d6?d=identicon)[iwanli](/maintainers/iwanli)

### Embed Badge

![Health badge](/badges/lancewan-laravel5-sweetalert/health.svg)

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

PHPackages © 2026

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