PHPackages                             apnem19/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. apnem19/laravel-alerts

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

apnem19/laravel-alerts
======================

Easy alerts with Laravel &amp; Vue.js

0.2(1y ago)02Vue

Since Jan 16Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (3)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 apnem19/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

21

—

LowBetter than 19% of packages

Maintenance42

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

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

Total

2

Last Release

481d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/apnem19-laravel-alerts/health.svg)](https://phpackages.com/packages/apnem19-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)
