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

Abandoned → [php-flasher/flasher-sweet-alert](/?search=php-flasher%2Fflasher-sweet-alert)Library

php-notify/notify-sweet-alert
=============================

PHP Flasher adapter for Sweet Alert 2

v1.0.1(3y ago)79.0kMITPHPPHP &gt;=5.3

Since Dec 14Pushed 3w ago1 watchersCompare

[ Source](https://github.com/php-flasher/flasher-sweet-alert)[ Packagist](https://packagist.org/packages/php-notify/notify-sweet-alert)[ Docs](https://php-flasher.io)[ Fund](https://www.paypal.com/paypalme/yoeunes)[ Fund](https://ko-fi.com/yoeunes)[ RSS](/packages/php-notify-notify-sweet-alert/feed)WikiDiscussions 2.x Synced today

READMEChangelogDependencies (1)Versions (58)Used By (0)

PHPFlasher SweetAlert Adapter (Prime)
=====================================

[](#phpflasher-sweetalert-adapter-prime)

[![Latest Version](https://camo.githubusercontent.com/2ca6e529e0ca645552e2fcf207c29c73ff31f5cd3be4093cdffe984ed7438e21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068702d666c61736865722f666c61736865722d7377656574616c6572742e737667)](https://packagist.org/packages/php-flasher/flasher-sweetalert)[![Total Downloads](https://camo.githubusercontent.com/f99f8eddc5ed04d87b82a8de4f36a4ac218081a0fb34da5e32ce6928071be30a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d666c61736865722f666c61736865722d7377656574616c6572742e737667)](https://packagist.org/packages/php-flasher/flasher-sweetalert)[![License](https://camo.githubusercontent.com/21cd1acbdd1fa2ee34d7cb4de2ec7fce205d0d883161eed70199a414fd7ed922/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068702d666c61736865722f666c61736865722d7377656574616c6572742e737667)](https://packagist.org/packages/php-flasher/flasher-sweetalert)

SweetAlert2 adapter for PHPFlasher. Beautiful alert dialogs with modal and toast support.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- PHPFlasher ^2.5.1

Installation
------------

[](#installation)

```
composer require php-flasher/flasher-sweetalert
```

Quick Start
-----------

[](#quick-start)

```
// Basic usage
sweetalert('Operation completed successfully!', 'success');
sweetalert('An error occurred.', 'error');
sweetalert('Information message.', 'info');
sweetalert('Warning message.', 'warning');

// With options
sweetalert('Success message', 'success', [
    'timer' => 3000,
    'toast' => true,
    'position' => 'top-end',
]);

// Modal dialog with options
sweetalert('Profile updated!', 'success', [
    'confirmButtonText' => 'Great!',
    'timer' => 5000,
]);
```

Features
--------

[](#features)

- **Simple API**: `success()`, `error()`, `info()`, `warning()`, `flash()`
- **SweetAlert2 Options**: `timer`, `toast`, `position`, `showConfirmButton`, `showCancelButton`
- **Modal Support**: Full SweetAlert2 modal dialogs and toasts
- **Type Safety**: Full PHP type hints and PHPStan support
- **Helper Functions**: Global `sweetalert()` helper for quick access

Available Methods
-----------------

[](#available-methods)

```
// Success notification
sweetalert($message, 'success', $options, $title);

// Error notification
sweetalert($message, 'error', $options, $title);

// Info notification
sweetalert($message, 'info', $options, $title);

// Warning notification
sweetalert($message, 'warning', $options, $title);

// Custom notification type
sweetalert($message, $type, $options, $title);

// With options
sweetalert($message, 'success', [
    'timer' => 3000,
    'toast' => true,
    'position' => 'top-end',
], $title);
```

Documentation
-------------

[](#documentation)

Complete documentation: [php-flasher.io](https://php-flasher.io)

License
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance62

Regular maintenance activity

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96.4% 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 ~9 days

Recently: every ~51 days

Total

56

Last Release

1455d ago

Major Versions

v0.9.7 → v1.0.02022-05-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/719ac0f6bf24d689686134530caf539727d784ad4a66c81ad5dcdba161b4ea0a?d=identicon)[yoeunes](/maintainers/yoeunes)

---

Top Contributors

[![yoeunes](https://avatars.githubusercontent.com/u/10859693?v=4)](https://github.com/yoeunes "yoeunes (53 commits)")[![yoeunes-spin](https://avatars.githubusercontent.com/u/86292260?v=4)](https://github.com/yoeunes-spin "yoeunes-spin (2 commits)")

---

Tags

flash-messagesnotification-systemphpphp-flashersweetalertyoeunesphpsymfonylaravellumennotificationsalertsmessagesnotifysweetalertpnotify

### Embed Badge

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

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

###  Alternatives

[helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

6127.3k](/packages/helmesvs-laravel-notify)[cartalyst/alerts

Alerts allows you to easily pass alert messages to your Laravel views.

3064.2k](/packages/cartalyst-alerts)[arcanedev/notify

Flexible flash notifications helper for Laravel.

139.5k1](/packages/arcanedev-notify)

PHPackages © 2026

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