PHPackages                             mhmiton/laravel-flashify - 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. mhmiton/laravel-flashify

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

mhmiton/laravel-flashify
========================

Showing multiple flash messages for the laravel or laravel-livewire.

v2.3.0(1mo ago)21.1kMITPHPPHP &gt;=7.0

Since May 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/mhmiton/laravel-flashify)[ Packagist](https://packagist.org/packages/mhmiton/laravel-flashify)[ RSS](/packages/mhmiton-laravel-flashify/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

Laravel Flashify
================

[](#laravel-flashify)

Showing multiple flash messages for the laravel or laravel-livewire.

 [![laravel-flashify](https://camo.githubusercontent.com/22ba798458f7e5f5e661889ece02c769ed61d0b64076c7c6b29116d165ad9be1/68747470733a2f2f6465762e6d686d69746f6e2e636f6d2f6c61726176656c2d666c6173686966792f7075626c69632f6c61726176656c2d666c6173686966792e676966)](https://camo.githubusercontent.com/22ba798458f7e5f5e661889ece02c769ed61d0b64076c7c6b29116d165ad9be1/68747470733a2f2f6465762e6d686d69746f6e2e636f6d2f6c61726176656c2d666c6173686966792f7075626c69632f6c61726176656c2d666c6173686966792e676966)

### Supported Plugins

[](#supported-plugins)

- [Sweetalert2](https://sweetalert2.github.io)
- [iziToast](https://izitoast.marcelodolza.com)

### Installation

[](#installation)

Install through composer:

```
composer require mhmiton/laravel-flashify

```

Publish the package's configuration file:

```
php artisan vendor:publish --tag=flashify-config

```

Publish the package's views:

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

```

### Scripts

[](#scripts)

Include the package scripts in your layout file.

```
@flashifyScripts

or

@include('flashify::components.scripts')

or

// Laravel 7 or greater

```

**Note:** You can modify these scripts by publishing the views file.

### Usage

[](#usage)

Layout example - if [Inject Plugins](#inject-plugins) is enabled:

```
>

        Laravel Flashify

```

Layout example - if [Inject Plugins](#inject-plugins) is disabled:

```
>

        Laravel Flashify

```

### Flash Message

[](#flash-message)

```
flashify('Created', 'Data has been created successfully.');
```

```
flashify('Created', 'Data has been created successfully.', 'success', []);
```

or

```
flashify()
    ->plugin('swal')
    ->title('Created')
    ->text('Data has been created successfully.')
    ->type('success')
    ->fire();
```

or

```
flashify([
    'plugin' => 'izi-toast',
    'title' => 'Updated',
    'text' => 'Data has been updated successfully.',
    'type' => 'success',
]);
```

### Flash Message With Response

[](#flash-message-with-response)

```
redirect()
    ->route('name')
    ->flashify('Created', 'Data has been created successfully.');
```

### Flash Message With Livewire

[](#flash-message-with-livewire)

```
flashify()
    ->plugin('swal')
    ->title('Created')
    ->text('Data has been created successfully.')
    ->type('success')
    ->livewire($this)
    ->fire();
```

or

```
flashify([
    'plugin' => 'izi-toast',
    'title' => 'Updated',
    'text' => 'Data has been updated successfully.',
    'type' => 'success',
    'livewire' => $this,
]);
```

### Presets

[](#presets)

Define preset messages in the config file "presets" key.

```
'presets' => [
    'created' => [
        'plugin'  => 'swal',
        'title'   => 'Created',
        'text'    => 'Data has been created successfully.',
        'type'    => 'success',
        'options' => [],
    ],
],
```

Show preset messages:

```
flashify('created');
```

```
flashify()->fire('created');
```

```
flashify([
    'preset' => 'created',
]);
```

```
redirect()
    ->route('name')
    ->flashify('created');
```

```
flashify()->livewire($this)->fire('created');
```

```
flashify([
    'preset' => 'created',
    'livewire' => $this,
]);
```

### Flash Message With JavaScript

[](#flash-message-with-javascript)

```
LaravelFlashify.fire({
    title: 'Created',
    text: 'Data has been created successfully.',
    type: 'success',
    options: {},
});
```

### Config

[](#config)

The config file is located at `config/flashify.php` after publishing the config file.

#### Plugin

[](#plugin)

```
/*
|--------------------------------------------------------------------------
| Plugin Configurations
|--------------------------------------------------------------------------
|
| Sweetalert2 plugin is used by default.
|
| Supported Plugin: 'swal', 'izi-toast'
|
*/

'plugin' => 'swal',
```

#### Inject Plugins

[](#inject-plugins)

```
/*
|--------------------------------------------------------------------------
| Auto-inject Plugin Assets
|--------------------------------------------------------------------------
|
| This configuration option controls whether or not to auto-inject plugin assets.
|
| By default, auto-inject is enabled.
|
| When auto-inject is enabled, the package will automatically inject the necessary
| JavaScript and CSS for plugins.
|
*/

'inject_plugins' => true,
```

#### Trans

[](#trans)

```
/*
|--------------------------------------------------------------------------
| Auto Translation For The Title and Text
|--------------------------------------------------------------------------
|
| Auto Translation is enabled by default.
|
| If the trans value is true, it will be use laravel lang helper __()
| for the title and text.
|
*/

'trans' => true,
```

#### Presets

[](#presets-1)

```
/*
|--------------------------------------------------------------------------
| Preset Messages
|--------------------------------------------------------------------------
|
| Define preset messages that will be reused.
|   ---> plugin => 'plugin'
|   ---> title => 'Message Title'
|   ---> text => 'Message Text'
|   ---> type => 'success|info|warning|error' (as per plugin)
|   ---> options => {Plugin Options}
|
*/

'presets' => [
    'created' => [
        'plugin'  => 'swal',
        'title'   => 'Created',
        'text'    => 'Data has been created successfully.',
        'type'    => 'success',
        'options' => [],
    ],

    .....
]
```

### License

[](#license)

Copyright (c) 2022 Mehediul Hassan Miton

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Recently: every ~272 days

Total

6

Last Release

49d ago

Major Versions

v1.1.0 → v2.0.02023-11-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/32da0ac461afc7803dd05f603044a4a05e93e19d3e4f043ee627f60883f22c03?d=identicon)[mhmiton](/maintainers/mhmiton)

---

Top Contributors

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

---

Tags

laravellaravel-flashifylaravel-livewire-flashifylivewire-flashify

### Embed Badge

![Health badge](/badges/mhmiton-laravel-flashify/health.svg)

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

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[firefly-iii/data-importer

Firefly III Data Import Tool.

7965.8k](/packages/firefly-iii-data-importer)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

98145.2k3](/packages/nickurt-laravel-akismet)[creasi/laravel-nusa

A Laravel package that aim to provide Indonesia' Administrative Data

997.7k2](/packages/creasi-laravel-nusa)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1319.7k3](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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