diff --git a/src/Database.php b/src/Database.php index 522729c..dbc18c2 100644 --- a/src/Database.php +++ b/src/Database.php @@ -2,8 +2,9 @@ namespace TargetLiu\PHPRedis; use Illuminate\Support\Arr; +use Illuminate\Contracts\Redis\Database as DatabaseContract; -class Database +class Database implements DatabaseContract { /** * The host address of the database. diff --git a/src/PHPRedis.php b/src/PHPRedis.php new file mode 100644 index 0000000..7f528d1 --- /dev/null +++ b/src/PHPRedis.php @@ -0,0 +1,24 @@ +app->singleton('phpredis', function ($app) { $app->configure('database'); return new Database($app->config['database.redis']);