Skip to content
Listening Laravel pRedis Queries
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
composer.json

README.md

Listening Laravel pRedis Queries

Installing

# composer.json

"minimum-stability": "dev",
"prefer-stable": true,
$ composer require "al-one/laravel-predis-listened" -vvv

Usage

# config/app.php
<?php

return [

    'providers' => [
        // Illuminate\Redis\RedisServiceProvider::class,
        Alone\LaravelRedisExtendable\RedisServiceProvider::class,
        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

You can’t perform that action at this time.