Laravel & redis 接続テスト

Installation

composer require predis/predis

 

@web.php

Route::get('/redis_test', function()

{

  print_r(app()->make('redis'));

}

 

// Illuminate\Redis\RedisManager Object ( [driver:protected] => predis [config:protected] => Array ( [default] => Array ( [host] => 127.0.0.1 [password] => [port] => 6379 [database] => 0 ) ) [connections:protected] => )