PHPackages                             moddyx/laravel-notify - 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. moddyx/laravel-notify

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

moddyx/laravel-notify
=====================

Flexible flash notifications for Laravel

00CSS

Since Mar 5Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://camo.githubusercontent.com/42b4fa43c16f2fa4dcf8db994c897dc084f9c0f25b414a9394f2e9051f888e96/68747470733a2f2f6172746875726d6f6e6e65792e636f6d2f696d616765732f6c61726176656c2d6e6f746966792e737667)](https://camo.githubusercontent.com/42b4fa43c16f2fa4dcf8db994c897dc084f9c0f25b414a9394f2e9051f888e96/68747470733a2f2f6172746875726d6f6e6e65792e636f6d2f696d616765732f6c61726176656c2d6e6f746966792e737667)

[![StyleCI](https://camo.githubusercontent.com/08165558577aec36083c234710d8dc4d79d0486019392ce73f7b890cb29b1115/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3231373735383932362f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/217758926)[![Build Status](https://camo.githubusercontent.com/8106cc2a881a306272a05cc755096b350eab9451e8ced0a51f76e3a369251dc0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d636b656e7a6965617274732f6c61726176656c2d6e6f746966792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/mckenziearts/laravel-notify)[![Total Downloads](https://camo.githubusercontent.com/5be8854ce84b0f3c1cd5def42139cd9f8e4d5f3c01f395b1c59d0258f403a80b/68747470733a2f2f706f7365722e707567782e6f72672f6d636b656e7a6965617274732f6c61726176656c2d6e6f746966792f642f746f74616c2e737667)](https://packagist.org/packages/mckenziearts/laravel-notify)[![Latest Stable Version](https://camo.githubusercontent.com/d34d6c09ca60942617715d2ddc17f0501b26139c0f8078dfa5ed5fb9b38837fa/68747470733a2f2f706f7365722e707567782e6f72672f6d636b656e7a6965617274732f6c61726176656c2d6e6f746966792f762f737461626c652e737667)](https://packagist.org/packages/mckenziearts/laravel-notify)[![License](https://camo.githubusercontent.com/6cea64c433517588ddd3682ea90da590b3fc723c771fa42b4a045974dbe13bf4/68747470733a2f2f706f7365722e707567782e6f72672f6d636b656e7a6965617274732f6c61726176656c2d6e6f746966792f6c6963656e73652e737667)](https://packagist.org/packages/mckenziearts/laravel-notify)

Introduction
------------

[](#introduction)

Laravel Notify is a package that lets you add custom notifications to your project. A diverse range of notification design is available and many are coming soon.

[![](https://camo.githubusercontent.com/b961c6d9702a8220f9e673c346d175b229e7e71e3a8d80171a6f9bf5c6770171/68747470733a2f2f7069782e77617463682f35497943366a2f4253727a4e562e706e67)](https://camo.githubusercontent.com/b961c6d9702a8220f9e673c346d175b229e7e71e3a8d80171a6f9bf5c6770171/68747470733a2f2f7069782e77617463682f35497943366a2f4253727a4e562e706e67)

Work In Progress
----------------

[](#work-in-progress)

This package is still under active development. If you need Android version please try this package [Aesthetic Dialogs](https://github.com/gabriel-TheCode/AestheticDialogs). Happy Coding 👨🏾‍💻

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

[](#installation)

You can install the package using composer

```
$ composer require mckenziearts/laravel-notify
```

Then add the service provider to `config/app.php`. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.

```
'providers' => [
    ...
    Mckenziearts\Notify\LaravelNotifyServiceProvider::class
    ...
];
```

You can publish the configuration file and assets by running:

```
$ php artisan vendor:publish --provider='Mckenziearts\Notify\LaravelNotifyServiceProvider'
```

Now that we have published a few new files to our application we need to reload them with the following command:

```
$ composer dump-autoload
```

Usage
-----

[](#usage)

1. Add styles links with `@notifyCss`
2. Add scripts links with `@notifyJs`
3. use `notify()` helper function inside your controller to set a toast notification for info, success, warning or error
4. Include notify partial to your master layout `@include('notify::messages')`

### Basic

[](#basic)

Within your controllers, before you perform a redirect call the `notify` method with a message.

```
public function store()
{
    notify()->success('Laravel Notify is awesome!');

    return Redirect::home();
}
```

An complete example:

```

        Laravel Notify
        @notifyCss

        @include('notify::messages')
        @notifyJs

```

### Type of notifications

[](#type-of-notifications)

Laravel Notify actually display 5 types of notifications

1. `toast` notification, who is default notification for Laravel Notify

```
notify()->success('Welcome to Laravel Notify ⚡️')
```

2. `connectify` notification, example of basic usage

```
connectify('success', 'Connection Found', 'Success Message Here')
```

3. `drakify` (😎) notification, only to display an alert

```
drakify('success') // for success alert
or
drakify('error') // for error alert
```

4. `smilify` notification, a simple custom toast notification using smiley 😊

```
smilify('success', 'You are successfully reconnected')
```

5. `emotify` notification, a simple custom toast notification using vector emoticon

```
emotify('success', 'You are awesome, your data was successfully created')
```

#### Preset Notifications

[](#preset-notifications)

If you have a specific notification that is used across multiple different places in your system, you can define it as a preset notification in your config file. This makes it easier to maintain commonly used notifications in one place. Read how to define preset messages in the [Config](#config) section below.

As an example, to use a preset notification you have defined called 'common-notification', use the following:

```
notify()->preset('common-notification')
```

You can override any of the values that are set in the config if you need to. For example, this could be useful if you have a common notification across, but you want to change the icon in one particular place that it's used without having to manually write out a new notification.

To do this, simply pass in an array that has the key of the attribute that you want to override and the value you want to override it with.

As an example, we could override the 'title' of our 'common-notification' by using the following:

```
notify()->preset('common-notification', ['title' => 'This is the overridden title'])
```

Config
------

[](#config)

Config file are located at `config/notify.php` after publishing provider element.

Some awesome stuff. To active `dark mode` update the `theme` config, or add global variable `NOTIFY_THEME` on your .env file

```
'theme' => env('NOTIFY_THEME', 'dark'),
```

Got result like that

[![](https://camo.githubusercontent.com/e33d1002bd0ef24bcf088a46b790b529a6aca21c28c2a39f411787dd3a3f0b74/68747470733a2f2f692e6962622e636f2f4656523939504a2f53637265656e73686f742d323031392d31322d31312d61742d32332d31322d32302e706e67)](https://camo.githubusercontent.com/e33d1002bd0ef24bcf088a46b790b529a6aca21c28c2a39f411787dd3a3f0b74/68747470733a2f2f692e6962622e636f2f4656523939504a2f53637265656e73686f742d323031392d31322d31312d61742d32332d31322d32302e706e67)

Laravel Notify use animate.css to set smooth animation to display and hide notify element.

```
/*
|--------------------------------------------------------------------------
| Animate Module (use animate.css)
|--------------------------------------------------------------------------
|
| Use animate.css to animate the notice.
|
*/

'animate' => [
    'in_class' => 'bounceInRight', // The class to use to animate the notice in.
    'out_class' => 'bounceOutRight', // The class to use to animate the notice out.
    'timeout'   => 5000 // Number of seconds before the notice disappears
],
```

You can now choose where the notification should appear with the `position` variable in the configuration file. By default the `top-right` position is enable.

```
'position' => 'top-right',
```

You can define preset notifications in the config file using the following structure:

```
'preset-messages' => [
    'user-updated' => [
        'message' => 'The user has been updated successfully.',
        'type'    => 'success',
        'icon'    => 'flaticon2-check-mark',
        'model'   => 'connect',
        'title'   => 'User Updated',
    ],
    'user-deleted' => [
        'message' => 'The user has been deleted successfully.',
        'type'    => 'success',
        'icon'    => 'flaticon2-check-mark',
        'model'   => 'connect',
        'title'   => 'User Deleted',
    ],
],
```

The example above shows the config for two preset notifications: 'user-updated' and 'user-deleted'.

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Arthur Monney](https://arthurmonney.com)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a9f370633e89c3bc9d13f3aa62d18e3e1359d7911cead8c1fe2e5cbe02c7e8a?d=identicon)[ryolay](/maintainers/ryolay)

### Embed Badge

![Health badge](/badges/moddyx-laravel-notify/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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