title: Laravel 5.5 PHPredis not working
body: <p>I am fighting with phpredis + laravel 5.5. (PHP 7.2, nginx, ubuntu) The following code works well. That means the server is configured properly. Also the redis-cli works ok.</p>
  
  <pre><code>$redis = new Redis();
  $con = $redis-&gt;connect('127.0.0.1', 6379);
  $redis-&gt;auth('password');   
  
  $redis-&gt;ping();
  </code></pre>
  
  <p>This one: </p>
  
  <pre><code>$redis = Redis::connection();
  </code></pre>
  
  <p>throws: <em>Call to undefined method Redis::connection()</em></p>
  
  <p>And this line:</p>
  
  <pre><code>Redis::set('name', 'Taylor')
  </code></pre>
  
  <p>throws: <em>Redis server went away</em></p>
  
  <p>I tried renaming the alias in config/app as some advice suggested, but it didn't help. Any idea, please?</p>
  
  <p>Edit:
  composer.json</p>
  
  <pre><code>"require": {
      "php": "&gt;=7.0.0",
      "laravel/framework": "5.5.7",
      "laravelcollective/html": "^5.3",
      "laravel/tinker": "~1.0",
      "intervention/image": "~2.0",
      "laravel/passport": "^4.0.2",
      "laracasts/utilities": "~2.0",
      "srmklive/paypal": "1.5.5",
      "guzzlehttp/guzzle": "~6.0",
      "torann/geoip": "^1.0",
      "doctrine/dbal": "^2.6",
      "mews/purifier": "~2.0",
      "talvbansal/media-manager": "2.5",
      "roumen/sitemap": "^2.7",
      "predis/predis": "^1.1"
  
  },
  </code></pre>
  
  <p>config/database.php:</p>
  
  <pre><code>'redis' =&gt; [
  
      'client' =&gt; 'phpredis',
  
  'cluster' =&gt; false,
  
      'default' =&gt; [
          'host' =&gt; env('REDIS_HOST', '127.0.0.1'),
          'password' =&gt; env('REDIS_PASSWORD', null),
          'port' =&gt; env('REDIS_PORT', 6379),
          'database' =&gt; 0,
  
      ],
  
  ],
  </code></pre>