al-one / laravel-predis-listened
Listening Laravel pRedis Queries
v1.9.0-beta1
2022-08-04 10:32 UTC
Requires
- php: ^7.1.3|^8.0
- illuminate/contracts: ^5.8.30|^6.0|^7.0|^8.0|^9.0
- illuminate/redis: ^5.8.30|^6.0|^7.0|^8.0|^9.0
- illuminate/support: ^5.8.30|^6.0|^7.0|^8.0|^9.0
- predis/predis: ^1.0
This package is auto-updated.
Last update: 2024-11-04 15:20:57 UTC
README
Installing
# composer.json
"minimum-stability": "dev",
"prefer-stable": true,
$ composer require "al-one/laravel-predis-listened" -vvv
Usage
# optional if >= 5.5 # config/app.php <?php return [ 'providers' => [ Alone\LaravelPredisListened\ServiceProvider::class, ], ];
# config/database.php <?php return [ 'redis' => [ 'client' => 'predis_listened', ], ];
use Alone\LaravelPredisListened\RedisEvent; Facades\Event::listen(RedisEvent::class,function(RedisEvent $event) { $event->command; // Redis命令 $event->arguments; // 参数 $event->time; // 耗时 });
License
MIT