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

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

php-flasher/flasher-sweet-alert
===============================

PHPFlasher - A powerful &amp; easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement &amp; enhances user experience. Intuitive design for beginners &amp; experienced developers. A reliable, flexible solution.

v2.5.2(1mo ago)71.1MMITPHPPHP &gt;=8.2

Since Dec 14Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/php-flasher/flasher-sweetalert)[ Packagist](https://packagist.org/packages/php-flasher/flasher-sweet-alert)[ Docs](https://php-flasher.io)[ GitHub Sponsors](https://github.com/yoeunes)[ RSS](/packages/php-flasher-flasher-sweet-alert/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelogDependencies (2)Versions (138)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.4.0

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

60

—

FairBetter than 99% of packages

Maintenance92

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 96.1% 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 ~14 days

Recently: every ~24 days

Total

136

Last Release

35d ago

Major Versions

v0.9.7 → v1.0.22022-05-16

1.x-dev → v2.0.02024-05-05

PHP version history (2 changes)v0.1.0PHP &gt;=5.3

v2.0.0PHP &gt;=8.2

### 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 (49 commits)")[![yoeunes-spin](https://avatars.githubusercontent.com/u/86292260?v=4)](https://github.com/yoeunes-spin "yoeunes-spin (2 commits)")

---

Tags

flash-messagesnotification-systemphpphp-flashersweetalertyoeunesflash-messageslaravel-notificationphp-notification-systemsymfony-notificationuser-feedback-toolsweb-application-notificationsphp-user-interfacecustomizable-alerts-phpinteractive-web-notificationsphp-messaging-libraryuser-engagement-php

### Embed Badge

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

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

###  Alternatives

[saasscaleup/laravel-log-alarm

Laravel log Alarm help you to set up alarm when errors occur in your system and send you a notification via Slack and email

27025.0k](/packages/saasscaleup-laravel-log-alarm)[bentools/webpush-bundle

Send push notifications through Web Push Protocol to your Symfony users.

71274.3k](/packages/bentools-webpush-bundle)[calchen/laravel-dingtalk-robot-notification

钉钉智能群助手 Laravel/Lumen 消息通知扩展包（Dingtalk robot message notifications for Laravel/Lumen）

2326.4k](/packages/calchen-laravel-dingtalk-robot-notification)

PHPackages © 2026

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