PHPackages                             laravelcode/laravel-sweet - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. laravelcode/laravel-sweet

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

laravelcode/laravel-sweet
=========================

Make sweet alert in Laravel project in easy way simple function do this job by this package

v1.2.x-dev(7y ago)120MITPHPPHP &gt;=5.5

Since Feb 18Pushed 7y agoCompare

[ Source](https://github.com/Uchiha-AhmedSaad/laravelcode-laravelsweet)[ Packagist](https://packagist.org/packages/laravelcode/laravel-sweet)[ RSS](/packages/laravelcode-laravel-sweet/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Install
-------

[](#install)

Using Composer

```
composer require laravelcode/laravel-sweet

```

Add the service provider to `config/app.php`

```
Laravelcode\LaravelSweet\SweetProvider::class,
```

Usage
-----

[](#usage)

inside class you want to use , this sweetalert package support arabic langauge inside it

### Basic

[](#basic)

```
/**
     *@param string $field_name  the name of your filed you make if you use it to make user write User.
     *@param string $method      The function of method ['Create','Update','Delete','Edit']
     *@param string $status      Choose one of this ['error','success','warning','info']
     *@param int    $time        choose the time you want to delay appear sweetalert 1 second = 1000
     *@return void               no return of this function sweetalert it just make session of this .
*/

class UsersController extends ComponentsController
{

    public function Index()
    {
        /*
            * SweetFlash("Users","Create","success",1000);
            * SweetFlash("Users","Create","error",1000);
            * SweetFlash("Users","Create","warning",1000);
            * SweetFlash("Users","Create","info",1000);
        */
        SweetFlash($field_name,$method,$status,$time);
    }

}
```

in this example $field\_name replace it with the name of your filed you make if you use sweet alert to Create User write in this field .

$method replace it with the name of your method creat or update or delete.

$status replace it with the status of your sweet warning or error or success.

$time replace it with the time you want to see sweet alert if you want to see it 2 second write 2000

if 5 5000 and so on

Then, in your view. master page

```
    @if (Session::has('Flash_message'))

            swal({
                icon:  "{{sweetElement('Flash_message') }}",
                title: "{{sweetElement('title')}}",
                timer: "{{sweetElement('timer')}}",
                text:  "{{sweetElement('text')}}"
            });

        {{Sweet_Session_fired()}}
    @endif
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

2

Last Release

2639d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f216a94af6e80657be067c68a354865850285c0efe74166433be3ed4ec343fff?d=identicon)[Uchiha-AhmedSaad](/maintainers/Uchiha-AhmedSaad)

---

Top Contributors

[![Uchiha-AhmedSaad](https://avatars.githubusercontent.com/u/34682185?v=4)](https://github.com/Uchiha-AhmedSaad "Uchiha-AhmedSaad (4 commits)")

---

Tags

laravelsweetalert

### Embed Badge

![Health badge](/badges/laravelcode-laravel-sweet/health.svg)

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

###  Alternatives

[highideas/laravel-users-online

This package will provide an online users management.

203113.2k1](/packages/highideas-laravel-users-online)[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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