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

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

bpocallaghan/alert
==================

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

1.2.3(1y ago)1819.6k↓50%83MITPHPPHP &gt;=7.0.0

Since Apr 1Pushed 7mo ago3 watchersCompare

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

READMEChangelog (7)DependenciesVersions (12)Used By (3)

Alert Box (Laravel)
===================

[](#alert-box-laravel)

A helper package to flash a bootstrap alert to the browser via a Facade or a helper function.

```

	Title Description

```

\###Want to see the current package in action, have a look at my starter project. ###[Laravel Starter Project](https://github.com/bpocallaghan/laravel-admin-starter)

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

[](#installation)

First, pull in the package through Composer.

```
"require": {
	"bpocallaghan/alert": "1.*"
}
```

OR

```
composer require bpocallaghan/alert
```

Usage
-----

[](#usage)

Within any view file.

```
@include('alert::alert')
```

Within any Controller.

```
public function index()
{
    // helper function - default to the 'info'
	alert('Title', 'Lorem Ipsum');

	// return object first
	alert()->info('Title', 'Lorem Ipsum');

	// via the facade
    Alert::info('Title', 'Lorem Ipsum');

	return view('home');
}
```

The different 'levels' are:

- `alert()->info('Title', 'Lorem Ipsum');`
- `alert()->success('Title', 'Lorem Ipsum');`
- `alert()->warning('Title', 'Lorem Ipsum');`
- `alert()->danger('Title', 'Lorem Ipsum');`

The different arguments:

- `alert()->info('Title', 'Lorem Ipsum', false);` // without the icon
- `alert()->info('Title', 'Lorem Ipsum', 'smile-o');` // specify the icon class
- `alert()->info('Title', 'Lorem Ipsum', 'smile-o', true);` // limit alert to the request lifecycle
- `alert()->message('Title', 'Lorem Ipsum', 'smile-o', true, 'info');` // specify the type of level
- `alert()->message('Title', 'Lorem Ipsum', 'smile-o', true, 'info', false);` // do not show the 'close'

If you need to modify the view partial, you can run:

```
php artisan vendor:publish --provider="Bpocallaghan\Alert\AlertServiceProvider"
```

The view partial can be found here `resources\views\vendor\alert\alert.blade`.

My other Packages
-----------------

[](#my-other-packages)

- [Laravel custom Generate Files with a config file and publishable stubs](https://github.com/bpocallaghan/generators)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance49

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~428 days

Recently: every ~524 days

Total

8

Last Release

700d ago

PHP version history (2 changes)1.0.1PHP &gt;=5.5.9

1.1.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cc52fc6eaeee1d7cbb729f7b7e7fb570754f4d2bb57847e5753f4e1041b7124?d=identicon)[bpocallaghan](/maintainers/bpocallaghan)

---

Top Contributors

[![bpocallaghan](https://avatars.githubusercontent.com/u/883465?v=4)](https://github.com/bpocallaghan "bpocallaghan (18 commits)")[![KelvinYee-GDC](https://avatars.githubusercontent.com/u/87979948?v=4)](https://github.com/KelvinYee-GDC "KelvinYee-GDC (4 commits)")[![nadja97](https://avatars.githubusercontent.com/u/30344577?v=4)](https://github.com/nadja97 "nadja97 (3 commits)")[![cblauth](https://avatars.githubusercontent.com/u/79920782?v=4)](https://github.com/cblauth "cblauth (1 commits)")[![Sylver11](https://avatars.githubusercontent.com/u/47780005?v=4)](https://github.com/Sylver11 "Sylver11 (1 commits)")

---

Tags

alerthacktoberfesthacktoberfest-2025laravelnotificationmessagelaravelnotificationflashalert

### Embed Badge

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

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

###  Alternatives

[kartik-v/yii2-widget-alert

A widget to generate alert based notifications using bootstrap-alert plugin (sub repo split from yii2-widgets)

284.1M24](/packages/kartik-v-yii2-widget-alert)[loveorigami/yii2-notification-wrapper

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

77199.7k5](/packages/loveorigami-yii2-notification-wrapper)[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)[sarfraznawaz2005/noty

Laravel package to incorporate noty flash notifications into laravel.

324.4k](/packages/sarfraznawaz2005-noty)

PHPackages © 2026

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