PHPackages                             depsimon/laravel-alerts - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. depsimon/laravel-alerts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

depsimon/laravel-alerts
=======================

Easy alerts with Laravel &amp; Vue.js

v1.2(7y ago)66301Vue

Since Aug 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/depsimon/laravel-alerts)[ Packagist](https://packagist.org/packages/depsimon/laravel-alerts)[ RSS](/packages/depsimon-laravel-alerts/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Easy alerts with Vue.js for your Laravel App
============================================

[](#easy-alerts-with-vuejs-for-your-laravel-app)

This package offers a Tailwind CSS &amp; Vue.js optimized notifications setup for your Laravel applications.

[![https://i.imgur.com/RH5Cmud.png](https://camo.githubusercontent.com/7acabca592cf180792e5d2d55b3b33e798872f32b4d146cb0fa2f816b5ddb8ef/68747470733a2f2f692e696d6775722e636f6d2f524835436d75642e706e67)](https://camo.githubusercontent.com/7acabca592cf180792e5d2d55b3b33e798872f32b4d146cb0fa2f816b5ddb8ef/68747470733a2f2f692e696d6775722e636f6d2f524835436d75642e706e67)

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

[](#installation)

You can install the package via composer:

```
composer require depsimon/laravel-alerts
```

Usage within Laravel
--------------------

[](#usage-within-laravel)

Within your controllers, before you perform a redirect, make a call to the `alert()` function.

```
public function show()
{
    alert('Resource Found!');

    return back();
}
```

You may also do:

- `alert_info('Info Message')`: Alert an 'info' message.
- `alert_success('Success Message')`: Alert an 'success' message.
- `alert_warning('Warning Message')`: Alert an 'warning' message.
- `alert_error('Error Message')`: Alert an 'error' message.
- `alert('Alert Message', 'Alert Title')`: Alert a message with a title.

Usage within Vue
----------------

[](#usage-within-vue)

Within your Vue.js components, you can `$emit` an `alert` event.

```
Events.$emit('alert', {
    title: "Success",
    message: "Your profile has been updated with success.",
    type: "success"
})
```

Only the `message` field is required.

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

[](#configuration)

After you've setup the alerts, you may display them in your views. We provide you with a template out of the box that works with Vue.js &amp; Tailwind CSS.

You're free to use it and customize it the way you want.

```
@include('alerts::alerts')
```

You'll also need to publish our Vue.js components. By default it'll import them in the `/resources/assets/js/vendor/alerts` folder.

```
php artisan vendor:publish --provider="Depsimon\Alerts\AlertsServiceProvider" --tag="components"
```

Then import them in your app.

```
window.Vue = require('vue')
window.Events = new Vue // This will be used to emit/receive alerts

Vue.component('alerts', require('./vendor/alerts/components/Alerts.vue'))
```

If you don't want to use the default template or the Vue.js component, you can publish the views and customize it the way you want. Just know the session key is `alerts`.

Here's an example custom template without Vue.js:

```
@foreach (session('alerts', collect())->toArray() as $alert)

        @if ($alert['title'])
        {{ $alert['title'] }}
        @endif

        {!! $alert['message'] !!}

@endforeach

{{ session()->forget('alerts') }}
```

Multiple Alerts
---------------

[](#multiple-alerts)

Need to send multiple alerts? No problem.

```
alert_success('Account Created with Success!');
alert_info('Welcome aboard!');

return redirect('home');
```

Icons
-----

[](#icons)

Default icons are from FontAwesome. You easily customize them in the `Alert.vue` component.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~10 days

Total

3

Last Release

2821d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/376c58dc4d5f1208a8424fb24a2e74f65d2ae7bf2679e8601f21fffb11064897?d=identicon)[depsimon](/maintainers/depsimon)

---

Top Contributors

[![depsimon](https://avatars.githubusercontent.com/u/1822289?v=4)](https://github.com/depsimon "depsimon (8 commits)")

### Embed Badge

![Health badge](/badges/depsimon-laravel-alerts/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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