PHPackages                             codemastersolucoes/flash-materialize - 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. codemastersolucoes/flash-materialize

ActiveLibrary

codemastersolucoes/flash-materialize
====================================

Easy flash notifications with Materialize-CSS

v1.1.0(8y ago)1290[1 issues](https://github.com/codemastersolutions/flash-materialize/issues)MITPHPPHP &gt;=7.0.0

Since Nov 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/codemastersolutions/flash-materialize)[ Packagist](https://packagist.org/packages/codemastersolucoes/flash-materialize)[ RSS](/packages/codemastersolucoes-flash-materialize/feed)WikiDiscussions master Synced 2mo ago

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

Easy Flash Messages for Your Laravel App with Materialize-CSS
=============================================================

[](#easy-flash-messages-for-your-laravel-app-with-materialize-css)

This project is a fork of the original [![laracasts/flash](https://github.com/laracasts/flash)](https://github.com/laracasts/flash) project.

This composer package offers a Google Materialize-CSS optimized flash messaging setup for your Laravel applications.

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

[](#installation)

Begin by pulling in the package through Composer.

```
composer require codemastersolucoes/flash-materialize
```

Next, if using Laravel 5, include the service provider within your `config/app.php` file.

```
'providers' => [
    CodeMasterSolucoes\FlashMaterialize\FlashServiceProvider::class,
];
```

After publishes, a configuration file is created in the config folder.

Config colors of flash messages
-------------------------------

[](#config-colors-of-flash-messages)

```
'colors' => [
        'info'    => [
            'message'   => [
                'background' => 'blue darken-2 font-weight-bold',
                'text'       =>  'white-text'
            ],
            'button' => [
                'background' => 'blue darken-2',
                'text'       => 'yellow-text'
            ],
        ],
        'success' => [
            'message' => [
                'background' => 'green',
                'text'       => 'white-text font-weight-bold'
            ],
            'button'  => [
                'background' => 'green',
                'text'       => 'white-text'
            ],
        ],
        'warning' => [
            'message' => [
                'background' => 'yellow darken-3',
                'text'       => 'black-text font-weight-bold'
            ],
            'button'  => [
                'background' => 'yellow darken-3',
                'text'       => 'red-text'
            ],
        ],
        'error'   => [
            'message' => [
                'background' => 'red',
                'text'       => 'white-text font-weight-bold'
            ],
            'button'  => [
                'background' => 'red',
                'text'       => 'white-text'
            ],
        ],
    ],
```

Config path of view
-------------------

[](#config-path-of-view)

```
'views_path' => base_path('resources/views/vendor/flash-materialize'),
```

Finally, as noted above, the default CSS classes for your flash message are optimized for Google Materialize-CSS. As such, pull in the Materialize-CSS, Materialize-JS and jQuery plugin within your HTML or layout file.

IMPORTANT!!! jQuery plugin should come before the Materialize-JS plugin!

```

```

Usage
-----

[](#usage)

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

```
public function store()
{
    flash('Welcome Aboard!');

    return home();
}

public function info()
{
    flash()->info('Message Info');

    return home();
}

public function success()
{
    flash()->success('Message Success');

    return home();
}

public function warning()
{
    flash()->warning('Message Warning');

    return home();
}

public function error()
{
    flash()->error('Message Error');

    return home();
}
```

You may also do:

- `flash('Message', 30000);` or `flash()->info('Message Info', 30000);`: Set the flash time to disappear from the screen.

With this message flashed to the session, you may now display it in your view(s). Because flash messages are so common, we provide a template out of the box to get you started. You're free to use - and even modify to your needs - this template how you see fit.

```
@include('flash::message')
```

After inserting the jQuery and Materialize-CSS scripts, enter the code below.

```
@stack('flash-materialize')
```

Example
-------

[](#example)

```
>

    Document

    @include('flash::message')

    Welcome to my website...

@stack('flash-materialize')

```

If you need to modify the flash message partials, you can run:

```
php artisan vendor:publish --provider="CodeMasterSolucoes\FlashMaterialize\FlashServiceProvider"
```

The two package views will now be located in the `resources/views/vendor/flash-materialize/` directory.

Default:

```
flash('Welcome Aboard!');

return home();
```

Assigning time (in milliseconds) for the message to disappear from the screen

```
flash('Disappear in 30 seconds', 30000);

return home();
```

Multiple Flash Messages
-----------------------

[](#multiple-flash-messages)

Need to flash multiple flash messages to the session? No problem.

```
flash('Message 1');
flash('Message 2', 30000);

return redirect('somewhere');
```

Done! You'll now see two flash messages upon redirect.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

2978d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.1.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63756350?v=4)[CodeMaster Soluções](/maintainers/codemastersolutions)[@codemastersolutions](https://github.com/codemastersolutions)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codemastersolucoes-flash-materialize/health.svg)

```
[![Health](https://phpackages.com/badges/codemastersolucoes-flash-materialize/health.svg)](https://phpackages.com/packages/codemastersolucoes-flash-materialize)
```

###  Alternatives

[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[reachweb/statamic-livewire-filters

Livewire filters for Statamic collections.

1710.5k](/packages/reachweb-statamic-livewire-filters)[tomshaw/electricgrid

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

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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