php-flasher/flasher-toastr

PHPFlasher Toastr - An extension for PHPFlasher to integrate Toastr notifications seamlessly in Laravel or Symfony. Enhances UX with elegant, responsive toast messages.

Maintainers

Package info

github.com/php-flasher/flasher-toastr

Homepage

Issues

pkg:composer/php-flasher/flasher-toastr

Fund package maintenance!

yoeunes

Statistics

Installs: 1 337 991

Dependents: 5

Suggesters: 0

Stars: 8

v2.5.0 2026-03-07 18:31 UTC

README

Latest Version Total Downloads License

Toastr adapter for PHPFlasher. Elegant toast notifications with full TypeScript support.

Requirements

  • PHP >= 8.2
  • PHPFlasher ^2.4.0

Installation

composer require php-flasher/flasher-toastr

Quick Start

// Basic usage
toastr('Operation completed successfully!', 'success');
toastr('An error occurred.', 'error');
toastr('Information message.', 'info');
toastr('Warning message.', 'warning');

// With options
toastr('Success message', 'success', [
    'timeOut' => 5000,
    'positionClass' => 'toast-top-right',
    'progressBar' => true,
]);

// Custom notification
toastr('Custom message', 'custom-type');

Features

  • Simple API: success(), error(), info(), warning(), flash()
  • Toastr Options: timeOut, positionClass, progressBar, closeButton, newestOnTop
  • Type Safety: Full PHP type hints and PHPStan support
  • Helper Functions: Global toastr() helper for quick access

Documentation

Complete documentation: php-flasher.io

License

MIT