PHPackages                             fantismic/alert-system - 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. fantismic/alert-system

ActiveLibrary

fantismic/alert-system
======================

Reusable Laravel alerting system

v1.8.4(9mo ago)0409MITBladePHP ^8.1

Since Jul 7Pushed 9mo agoCompare

[ Source](https://github.com/fantismic/laravel-alert-system)[ Packagist](https://packagist.org/packages/fantismic/alert-system)[ RSS](/packages/fantismic-alert-system/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (49)Used By (0)

Laravel Alert System
====================

[](#laravel-alert-system)

[![Laravel](https://camo.githubusercontent.com/99f24dbe5cc2ef6e8f83e751c29717019493fa75a1f356fc6343b0d4c704824a/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f6c6162656c3d6c61726176656c266d6573736167653d25453225383925413531312e3026636f6c6f723d303037384245266c6f676f3d6c61726176656c267374796c653d666c61742d737175617265253232)](https://packagist.org/packages/fantismic/alert-system)[![Version](https://camo.githubusercontent.com/c2ac9dba89504b2f9fdf40ebfbf44191fa10706412b7ef38f06953c2194031b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66616e7469736d69632f616c6572742d73797374656d)](https://packagist.org/packages/fantismic/alert-system)[![Downloads](https://camo.githubusercontent.com/adce5578c014592c78f1d138045a6a1a8051ec601d21dc46a2d05863da0bc4ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66616e7469736d69632f616c6572742d73797374656d)](https://packagist.org/packages/fantismic/alert-system)[![Licence](https://camo.githubusercontent.com/f609841ac8043072e313c9949140bfc07aa652a2608d740df031808c08409fb7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66616e7469736d69632f616c6572742d73797374656d)](https://packagist.org/packages/fantismic/alert-system)

A reusable Laravel package to send alerts via multiple channels (e.g., mail, telegram) based on alert **type** and **channel** combinations — stored in the database for easy admin management.

✨ Features
----------

[](#-features)

- Alert types like `System`, `User` (customizable)
- Channel support: `mail`, `telegram`, `discord` (more to come)
- Dynamically manage recipients from the database
- Supports Laravel Notifications and queues
- Uses a Facade: `Alert::send(...)`
- Includes an optional dashboard with filters and search
- Logs each alert sent per recipient and status

---

### ✅ Requirements

[](#-requirements)

#### Mandatory

[](#mandatory)

- Laravel &gt;= 11
- PHP &gt;= 8.1
- Database migrations

#### Optional

[](#optional)

- Tailwind CSS (for UI)
- Livewire (for UI)

---

### 📷 Screenshots

[](#-screenshots)

#### Mail

[](#mail)

##### Light mode

[](#light-mode)

[![Image description](https://camo.githubusercontent.com/d607308f0c867706c0f80492d3d9b08b95b1c8f37cce07bbbcb773b5454ea22a/68747470733a2f2f692e706f7374696d672e63632f793866774e4c7a562f53797374656d2d416c6572742d4c696768742d4d6f64652e706e67)](https://camo.githubusercontent.com/d607308f0c867706c0f80492d3d9b08b95b1c8f37cce07bbbcb773b5454ea22a/68747470733a2f2f692e706f7374696d672e63632f793866774e4c7a562f53797374656d2d416c6572742d4c696768742d4d6f64652e706e67)

##### Dark mode

[](#dark-mode)

[![Image description](https://camo.githubusercontent.com/83683145c7d98a30cb7673d9bb3031b25796f0854f3e64a8572b174b2ab1a2c7/68747470733a2f2f692e706f7374696d672e63632f37596e464678734a2f53797374656d2d416c6572742d4461726b2d4d6f64652e706e67)](https://camo.githubusercontent.com/83683145c7d98a30cb7673d9bb3031b25796f0854f3e64a8572b174b2ab1a2c7/68747470733a2f2f692e706f7374696d672e63632f37596e464678734a2f53797374656d2d416c6572742d4461726b2d4d6f64652e706e67)

##### Telegram

[](#telegram)

[![Image description](https://camo.githubusercontent.com/7858b0f8893424be4fa690edf377e1ad3cda6ca1f61b09e0ac39884fac627c4a/68747470733a2f2f692e706f7374696d672e63632f566b7378313370472f53797374656d2d416c6572742d54656c656772616d2e706e67)](https://camo.githubusercontent.com/7858b0f8893424be4fa690edf377e1ad3cda6ca1f61b09e0ac39884fac627c4a/68747470733a2f2f692e706f7374696d672e63632f566b7378313370472f53797374656d2d416c6572742d54656c656772616d2e706e67)

---

📦 Installation
--------------

[](#-installation)

```
composer require fantismic/alert-system
```

Publish migrations

```
php artisan vendor:publish --tag=alert-system-migrations
php artisan migrate
```

Publish configuration:

```
php artisan vendor:publish --tag=alert-system-config
```

> You can define:
>
> - Which **Blade layout** to use for the Livewire UI
> - Which **environments** (`envs`) are allowed to send alerts
> - Set **telegram token**
> - Set **telegram proxy**
> - Set **global cooldown**
>
> You can set as many telegram bots as you like here, or leave only one and use different addresses to different groups for the same bot.

Publish seeders (optional):

```
php artisan vendor:publish --tag=alert-system-seeders
php artisan db:seed --class=AlertTypesTableSeeder
php artisan db:seed --class=AlertChannelsTableSeeder
```

---

📁 Tables
--------

[](#-tables)

This package creates the following tables:

- `alert_types`
- `alert_channels`
- `alert_recipients`
- `alert_logs`

Example:

TypeChannelAddressSystemmailSystemtelegram@sysadmin\_channel---

🚀 Usage
-------

[](#-usage)

```
use Fantismic\AlertSystem\Facades\Alert;

Alert::send('Healthcheck', '🔥 CPU is on fire');
```

```
use Fantismic\AlertSystem\Facades\Alert;

Alert::send('System', 'The disk is almost full', [
    'host' => 'web-01',
    'threshold' => '95%',
], [
    'mailSubject' => '🚨 Disk Alert',
    'cooldown' => 0,
]);
```

This will:

- Look up all recipients for the given type
- Send via all associated channels (mail, telegram)
- Log success/failure per recipient

---

🧠 Signature
-----------

[](#-signature)

```
Alert::send(
    string $type,
    string $message,
    array $details = [],
    array $options = [] // mailSubject, cooldown
): void
```

---

🛠️ Customization
----------------

[](#️-customization)

### Email Templates

[](#email-templates)

After publishing the views:

```
php artisan vendor:publish --tag=alert-system-views
```

You'll find the default template at:

```
resources/views/vendor/alert-system/mail/error_alerts/default.blade.php

```

Use Blade logic to customize per type (e.g., `error_alerts.system.blade.php`).

---

🖥️ Admin UI
-----------

[](#️-admin-ui)

### 📍 Routes

[](#-routes)

PathRoute Name/admin/alerts/dashboardalerts.dashboard/admin/alerts/typesalerts.types/admin/alerts/channelsalerts.channels/admin/alerts/recipientsalerts.recipientsUses `web` and `auth` middleware by default.

---

### 💡 Features

[](#-features-1)

- Create, edit, delete alert types, channels, and recipients
- View alert logs in a searchable, filterable table
- Filter by status (success/failure), type, channel
- View alert detail in a modal
- Export alert logs to CSV
- Dark mode support

---

📊 Logs
------

[](#-logs)

Each time an alert is sent, a log is created in the `alert_logs` table.

### 🧾 Columns

[](#-columns)

ColumnDescriptionidPrimary keytypeAlert type namechannelChannel name (mail/telegram)addressRecipient addressbotBot (if applicable)subjectSubject usedmessageMessage useddetailsJSON-encoded extra detailsstatus`success` or `failure`error\_messageError if status is `failure`sent\_atTimestampcreated\_atTimestampupdated\_atTimestamp---

### 🧱 Model

[](#-model)

You can use the model directly for custom dashboards:

```
use Fantismic\AlertSystem\Models\AlertLog;

$recent = AlertLog::latest()->take(10)->get();
```

---

✅ License
---------

[](#-license)

MIT © Fantismic

---

[![Image description](https://camo.githubusercontent.com/8b8f2aa4644bcec23e09cee09ad6ee667da2bd12e6d9db6269502aa4559cd537/68747470733a2f2f692e706f7374696d672e63632f53784237623154302f66616e7469736d69632d6e6f2d6261636b67726f756e642e706e67)](https://github.com/fantismic)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance57

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

Recently: every ~7 days

Total

48

Last Release

280d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/984d8f1b0964c85832a90864e5e3e6526d0299d4d06093dae94513a2c9d48196?d=identicon)[fantismic](/maintainers/fantismic)

---

Top Contributors

[![fantismic](https://avatars.githubusercontent.com/u/59127102?v=4)](https://github.com/fantismic "fantismic (1 commits)")

### Embed Badge

![Health badge](/badges/fantismic-alert-system/health.svg)

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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