combindma/flash

Easy Flash Messages for a Laravel App

2.2.0 2024-03-16 00:46 UTC

This package is auto-updated.

Last update: 2024-11-16 02:21:41 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require combindma/flash

Usage

class MySpecialSnowflakeController
{
    public function store()
    {
        // …

        flash('My message', 'my-class');

        return back();
    }
}

In your view you can do this:

@if (flash()->message)
<div class="{{ flash()->class }}">
    {{ flash()->message }}
</div>
@endif

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.