PHPackages                             errehub/laravel-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. errehub/laravel-alert

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

errehub/laravel-alert
=====================

This project aims to give developers a new experience with alerts in Laravel.

v1.0.6(1y ago)313MITPHPPHP &gt;=8.2

Since Jan 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/youssef-erremili/laravel-alert-package)[ Packagist](https://packagist.org/packages/errehub/laravel-alert)[ RSS](/packages/errehub-laravel-alert/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (6)Used By (0)

errehub/laravel-alert
=====================

[](#errehublaravel-alert)

This package is based on the Laravel Framework (php) and provides a simple, customizable way to manage alert messages in your Laravel application. With this package, you can easily display success, error, info, and warning messages to users via session flash messages and styled alerts.

Installation
============

[](#installation)

Use Composer to install the package. Make sure Composer is already installed in your project.

```
  composer require errehub/laravel-alert
```

Setup
=====

[](#setup)

### 1. Publish CSS and JavaScript Assets

[](#1-publish-css-and-javascript-assets)

First, you need to publish the CSS and JavaScript files, run the following Artisan command. This will copy the files to the public/vendor/youssef-erremili directory:

```
  php artisan vendor:publish --tag=public
```

### 2. Include Alert Views in Your App Layout

[](#2-include-alert-views-in-your-app-layout)

Use @include('alert::alerts.alert') in your main layout file. This will include the alert component in your layout and make it available to all pages that extend this layout.

```
>

    Alert Example

    @include('alert::alerts.alert')

    alert_success('Hello Youssef Erremili!')

```

### 3. Publish Alert View Components

[](#3-publish-alert-view-components)

To publish the package's Blade view components to resources/vendor/youssef-erremili, use the following command:

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

Usage
=====

[](#usage)

In this section, I will explain how to use the package in your Laravel project, both through the Facade in your Controller and using the helper function in your Blade files.

### 1. In Controllers

[](#1-in-controllers)

You can use the package's Facade or class instance in your controllers to display alerts.

```
    use Errehub\LaravelAlert\AlertFacade as Notifier; // Import the Facade
    use Errehub\LaravelAlert\Alert; // Import the Alert class

    class AuthController
    {
        public function login()
        {
            // Using the AlertFacade via the Notifier alias:
            Notifier::success('You have logged in successfully');
            Notifier::error('Sorry, something went wrong. Please try again.');
            Notifier::info('You have a new notification');
            Notifier::warning('Please confirm if you want to proceed');

            // Using the Alert class directly:
            $alert = new Alert();
            $alert->success('Welcome, Youssef Erremili!');
            $alert->error('An error occurred.');
            $alert->info('This is an informational message.');
            $alert->warning('This is a warning message.');

            // Or alternatively:
            $alertMessage = (new Alert())->success('Welcome back!');
        }
    }
```

### 2. In Blade Templates

[](#2-in-blade-templates)

You can use helper functions in your Blade templates to display alerts.

```
>

    Alert Example

    alert_success('Hello Youssef Erremili!')

```

Customization
=============

[](#customization)

You can customize the alert views by modifying the Blade files published to resources/vendor/youssef-erremili.

License
=======

[](#license)

This package is open-source software licensed under the MIT license.

Credits
=======

[](#credits)

Created by Youssef Erremili.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

5

Last Release

518d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/101400204?v=4)[YoussefErremili](/maintainers/youssef-erremili)[@youssef-erremili](https://github.com/youssef-erremili)

---

Top Contributors

[![youssef-erremili](https://avatars.githubusercontent.com/u/101400204?v=4)](https://github.com/youssef-erremili "youssef-erremili (33 commits)")

---

Tags

messagelaravelnotificationsessionflashalerttoast

### Embed Badge

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

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

###  Alternatives

[loveorigami/yii2-notification-wrapper

This module for renders a message from session flash (with ajax, pjax support and etc.)

76206.2k5](/packages/loveorigami-yii2-notification-wrapper)[bpocallaghan/alert

A helper package to flash a bootstrap alert to the browser.

1921.2k3](/packages/bpocallaghan-alert)[ras/flash-alert-bundle

FlashAlertBundle provides a simplified way to handle (add/display) Symfony flash messages. Client side scripts are written in pure JavaScript.

2423.3k](/packages/ras-flash-alert-bundle)[diecoding/yii2-toastr

Simple flash toastr notifications for Yii2

1330.6k](/packages/diecoding-yii2-toastr)

PHPackages © 2026

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