PHPackages                             nidesky/sweet-alert - 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. nidesky/sweet-alert

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

nidesky/sweet-alert
===================

214CSS

Since Aug 12Pushed 10y ago1 watchersCompare

[ Source](https://github.com/nidesky/sweetalert)[ Packagist](https://packagist.org/packages/nidesky/sweet-alert)[ RSS](/packages/nidesky-sweet-alert/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SweetAlertxian
==============

[](#sweetalertxian)

> Base on [t4t5/sweetalert](https://github.com/t4t5/sweetalert)

### 第一步：安装

[](#第一步安装)

```
composer require nidesky/sweet-alert

```

### 第二步：配置

[](#第二步配置)

```
// 打开 config/app.php
// 在providers中添加

Nidesky\SweetAlert\SweetAlertServiceProvider::class,

// 在alias中添加
'Alert' => Nidesky\SweetAlert\Facades\SweetAlert::class,
```

再执行

```
php artisan vendor:publish
```

### 第三步：使用

[](#第三步使用)

```
// 在控制器中调用
\Alert::success($title, $msg)

// 在模板中调用

{!! Alert::css() !!}
{!! Alert::js() !!}

@include('sweetalert:sweetalert')

// 如果只是在前端

swal("Good job!", "You clicked the button!", "success")
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/44feadb3b0eed342760e7ac4bbfd198410c418720aba0c338f65bd3ac831a899?d=identicon)[nidesky](/maintainers/nidesky)

---

Top Contributors

[![nidesky](https://avatars.githubusercontent.com/u/7133406?v=4)](https://github.com/nidesky "nidesky (6 commits)")

### Embed Badge

![Health badge](/badges/nidesky-sweet-alert/health.svg)

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

###  Alternatives

[inpsyde/composer-assets-compiler

Composer plugin that installs and compile frontend dependencies for installed Composer packages based on configuration.

25278.4k1](/packages/inpsyde-composer-assets-compiler)[tochka-developers/work-calendar

Russian Federation production calendar extension for Carbon

1823.8k](/packages/tochka-developers-work-calendar)[subzeta/ruling

An stateless rule engine

2011.9k](/packages/subzeta-ruling)[mediawiki/semantic-bundle

Bundle extension that installs and loads Semantic MediaWiki and associated extensions

204.4k](/packages/mediawiki-semantic-bundle)

PHPackages © 2026

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