Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tall Flash Laravel Package

wvandeweyer/tall-flash

View on GitHub
Deep Wiki
Context7

TALL Stack Flash Notification

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


This is a package to send flash messages in a Laravel app via either the session storage or via Livewire.

Usage

Usage via session storage

class MyAwesomeController
{
    public function store()
    {
        // ......
        flash()->success('Hooray, we have saved your input');
        // ....
    }
}

Livewire Flash Message

To flash a message via Livewire, you must chain livewire($this). This will emit the information to the Flash notification component.

public function livewireMethod()
{
    flash()->info('I want to share this info message.')->livewire($this);
}

Dismissable Messages

Messages can be dismissible when chaining dismissable() or not dismissable by chaining notDismissable() or dismissable(false)

By default the messages will be dismissable. The default can be changed by publising the config file and changing the defaults.dismissable value.

The package uses AlpineJS to hide the message in this case.

Display Messages

You can display the messages by including this Livewire component in your template. It will display messages stored in the session, as well as messages emitted via Livewire.

<livewire:flash-message />

Message types

By default following levels are defined, but can be changed in the config file.

  • info
  • error
  • warning
  • success

When adding a level, you must also update the view flash-message.blade.php . The styles are included in the blade file for the sole reason Tailwind will scan it when purging classes.


Installation

You can install the package via composer:

composer require wvandeweyer/tall-flash

You can publish the config file with:

php artisan vendor:publish --provider="Wvandeweyer\Flash\FlashServiceProvider"

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security related issues, please email wim@wimvandeweyer.be instead of using the issue tracker.

Credits

License

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

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle