Fix incorrect examples in src/Prime/README.md

- Replace non-existent static Flasher:: calls with flash() helper function
This commit is contained in:
Younes ENNAJI
2026-01-10 04:21:03 +01:00
parent 5a4d46b46b
commit a002590d56
+4 -6
View File
@@ -19,22 +19,20 @@ composer require php-flasher/flasher
## Quick Start ## Quick Start
```php ```php
use Flasher\Prime\Flasher;
// Success notification // Success notification
Flasher::success('Operation completed successfully!'); flash('Operation completed successfully!', 'success');
// Error notification // Error notification
Flasher::error('An error occurred.'); flash('An error occurred.', 'error');
// With options // With options
Flasher::success('Profile updated!', [ flash('Profile updated!', 'success', [
'timeout' => 5000, 'timeout' => 5000,
'position' => 'top-right', 'position' => 'top-right',
]); ]);
// With translation // With translation
Flasher::info('Welcome back!', [ flash('Welcome back!', 'info', [
'translate' => true, 'translate' => true,
'locale' => 'en', 'locale' => 'en',
]); ]);