PHPackages                             inengine/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. inengine/alert

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

inengine/alert
==============

In App Alert Notifications for Laravel/InEngine Applications

1.0.1(3mo ago)076MITPHPPHP ^8.4CI passing

Since Apr 2Pushed 1mo agoCompare

[ Source](https://github.com/InEngine/Alert)[ Packagist](https://packagist.org/packages/inengine/alert)[ Docs](https://github.com/inengine/alert)[ GitHub Sponsors]()[ RSS](/packages/inengine-alert/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (13)Versions (3)Used By (0)

InEngine Alert
==============

[](#inengine-alert)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f2ed35b4f66f5e716cb0e5ec30bb8ab4d0bc1e21e637c830bf940eda2e309ebb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e656e67696e652f616c6572742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/inengine/alert)[![GitHub Tests Action Status](https://camo.githubusercontent.com/50eee9c52bb0289fec58438106c2d56e48c6b502feb821c4083a4052fe6ada14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e656e67696e652f616c6572742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/inengine/alert/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/aef7bce8c6944128a083d6b7f6943f97023ba4a8bf5916e0156a85e142d001e2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e656e67696e652f616c6572742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/inengine/alert/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/7c01974e9507aeccc8e66e05027b608bb428b682d1fbede87ecce36424864d95/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e656e67696e652f616c6572742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/inengine/alert)

In-app alert notifications for Laravel applications. Alerts are stored as Laravel database notifications; a Livewire \* *alert bell*\* shows unread items in a dropdown and links to a configurable “view all” URL. Alert types (General, Important, Urgent, Task, Info) are configurable and map to notification classes under `InEngine\Alert\Alerts`.

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

[](#requirements)

- PHP **8.4+**
- Laravel **11**, **12**, or **13**
- **Livewire** (optional but required for the bell UI)
- A **notifiable** Eloquent model with an `alerts()` relationship (see `HasAlerts`)

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

[](#installation)

```
composer require inengine/alert
```

Publish the config (recommended):

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

Adjust `config/alert.php` for your user (or other notifiable) model, search field, alert type icons/CSS, and the “view all alerts” target.

Publish views if you need to customize Blade markup:

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

Stylesheet (Tailwind v4)
------------------------

[](#stylesheet-tailwind-v4)

UI classes use a BEM-style naming convention (`alert-bell`, `alert-dropdown__header`, `alert-card__title`, etc.). The source styles live in **`resources/css/alert.css`** as Tailwind `@layer components` rules. The package ships with a pre-built file at **`public/css/alert.css`** for apps that do not want to build the package locally.

### Building CSS from this package

[](#building-css-from-this-package)

After changing `resources/css/alert.css`, rebuild from the package root:

```
npm install
npm run build
```

This outputs the compiled CSS to `public/css/alert.css`. Commit both the source and the built file when contributing changes.

### Publishing CSS into your application

[](#publishing-css-into-your-application)

```
php artisan vendor:publish --tag=alert-css
```

That copies the built stylesheet to **`public/vendor/inengine/alert.css`**. Link it in your layout (after your main app CSS, if you rely on base resets, or alone if the bundle is sufficient):

```

```

The compiled bundle is self-contained (Tailwind theme variables are included), so spacing utilities such as `p-2`resolve correctly without a separate override stylesheet.

### Layout and spacing conventions

[](#layout-and-spacing-conventions)

Defaults are tuned so that the text is not crowded against the card or dropdown:

- **Alert cards** use compact padding (`p-2` on `.alert-card`). Title row and body share the same horizontal inset; extra left margin on the row/main was removed so the title and body align with the card padding.
- **Dropdown** header uses `px-2 py-2` and `gap-2` between actions; the list area uses consistent horizontal padding so stacked cards sit inset from the panel edge.

To change density or alignment, edit **`resources/css/alert.css`** and run **`npm run build`**, then republish or copy `public/css/alert.css` into your app.

Configuration
-------------

[](#configuration)

Published `config/alert.php` includes:

KeyPurpose`Alerts`Map of alert type FQCN → `icon` and `css` strings for display in the UI`model.FQN`Notifiable model class used by `alert:send` and the livewire component`model.search_property`Column used when searching recipients in `alert:send``view_all_alerts_route`Named route, path, or full URL for “View all alerts”; falls back to `route('alerts.index')` or `#`Usage
-----

[](#usage)

### Notifiable model

[](#notifiable-model)

Your model should use the **`InEngine\Alert\Traits\HasAlerts`** (which includes Laravel’s `Notifiable` trait) trait, which exposes an `alerts()` relationship scoped to the configured alert types and unread notifications.

### Livewire alert component

[](#livewire-alert-component)

The **`alert-bell`** component is registered automatically when Livewire is installed, and the configuration property `config('alert.model.FQN')` is a class that defines **`alerts()`** via the `HasAlerts` trait.

```

```

Tailwind classes for the bell and badge:

```

```

### Artisan: send an alert

[](#artisan-send-an-alert)

```
php artisan alert:send
```

Interactive prompts choose recipients (from `alert.model`), type, title, message, and optional link.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

Contributing
------------

[](#contributing)

Pull requests are welcome. Run `composer test` and `composer format` before submitting.

Security
--------

[](#security)

Please report security issues according to the policy published for this repository.

Credits
-------

[](#credits)

- [James Johnson](https://github.com/InEngine)
- [Contributors](https://github.com/inengine/alert/contributors)

License
-------

[](#license)

The MIT License. See [LICENSE.md](LICENSE.md).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance86

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e7417da57a74bf0827bb79e987fb6c66c530946ed22c39ec5f175c3a6211a98?d=identicon)[excellentingenuity](/maintainers/excellentingenuity)

---

Top Contributors

[![excellentingenuity](https://avatars.githubusercontent.com/u/1653629?v=4)](https://github.com/excellentingenuity "excellentingenuity (11 commits)")

---

Tags

laravelalertInEngine

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M188](/packages/laravel-ai)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M97](/packages/dedoc-scramble)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k90](/packages/nativephp-mobile)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24857.5k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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