Files
php-flasher/src/Laravel
Younes ENNAJI d7234c64a2 Simplify verbose PHPDoc class descriptions across 76 files
Remove descriptive class/interface-level documentation that duplicates
what the class/interface names already convey, while keeping all
type annotations (@param, @return, @var, @throws, @phpstan-, @mixin,
@template, @internal).

Files modified:
- Symfony integration (18 files): Attribute, Translation, Template,
  Component, Storage, Support, Http, Profiler, Command, Twig,
  EventListener, FlasherSymfonyBundle
- Laravel integration (13 files): ServiceProvider, Storage, Middleware,
  Http, Facade, Template, Translation, Command, Component, EventListener
- Prime/EventDispatcher (17 files): Events and EventListeners
- Prime/Storage (11 files): Filter/Criteria and Bag interfaces
- Prime/Stamp (4 files): Interface and stamp classes
- Prime/Factory (5 files): Factory interfaces and implementations
- Prime/Notification (2 files): Envelope and Notification
- Prime/Support/Traits (1 file): ForwardsCalls
2026-01-16 01:46:44 +01:00
..
2024-04-09 07:57:01 +00:00
2024-04-09 07:57:01 +00:00
2024-04-09 07:57:01 +00:00

PHPFlasher Laravel Adapter

Latest Version Total Downloads License

Laravel framework adapter for PHPFlasher. Seamless integration with zero JavaScript setup.

Requirements

  • PHP >= 8.2
  • Laravel >= 11.0

Installation

composer require php-flasher/flasher-laravel

Run the install command:

php artisan flasher:install

Quick Start

// Success notification
flash()->success('Operation completed successfully!');

// Error notification
flash()->error('An error occurred.');

// With options
flash()->success('Profile updated!', [
    'timeout' => 5000,
    'position' => 'top-right',
]);

// In controller
public function update(Request $request)
{
    // Your logic...

    flash()->success('Changes saved!');

    return redirect()->back();
}

Configuration

Publish configuration file:

php artisan flasher:install --config

This creates config/flasher.php where you can customize:

  • Default adapter
  • Global options
  • Flash bag mapping
  • Presets

Documentation

Complete documentation: php-flasher.io

License

MIT