mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
Fix incorrect examples in src/Prime/README.md
- Replace non-existent static Flasher:: calls with flash() helper function
This commit is contained in:
+4
-6
@@ -19,22 +19,20 @@ composer require php-flasher/flasher
|
||||
## Quick Start
|
||||
|
||||
```php
|
||||
use Flasher\Prime\Flasher;
|
||||
|
||||
// Success notification
|
||||
Flasher::success('Operation completed successfully!');
|
||||
flash('Operation completed successfully!', 'success');
|
||||
|
||||
// Error notification
|
||||
Flasher::error('An error occurred.');
|
||||
flash('An error occurred.', 'error');
|
||||
|
||||
// With options
|
||||
Flasher::success('Profile updated!', [
|
||||
flash('Profile updated!', 'success', [
|
||||
'timeout' => 5000,
|
||||
'position' => 'top-right',
|
||||
]);
|
||||
|
||||
// With translation
|
||||
Flasher::info('Welcome back!', [
|
||||
flash('Welcome back!', 'info', [
|
||||
'translate' => true,
|
||||
'locale' => 'en',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user