php-flasher/flasher-laravel
Composer 安装命令:
composer require php-flasher/flasher-laravel
包简介
Seamlessly integrate flash notifications into your Laravel applications with PHPFlasher. Enhance user feedback and engagement with minimal setup.
README 文档
README
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
统计信息
- 总下载量: 2.93M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 45
- 点击次数: 18
- 依赖项目数: 28
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-06