title: Cannot open source device in random_bytes() Laravel PHP 7.0
body: <p>I visite many forum, but i can't find the best solution for my problems. 
  In laravel 5, i have this error : </p>
  
  <pre><code>Cannot open source device in random_bytes() : 
  Exception in Str.php line 243:
  Cannot open source device
  in Str.php line 243
  at random_bytes('25') in Str.php line 243
  at Str::randomBytes('25') in Str.php line 227
  at Str::random('25') in Store.php line 197
  at Store-&gt;generateSessionId() in Store.php line 173
  </code></pre>
  
  <p>The str.php is in : httpdocs/vendor/laravel/framework/src/Illuminate/Support/Str.php
  at : </p>
  
  <pre><code>/**
   * Generate a more truly "random" alpha-numeric string.
   *
   * @param  int  $length
   * @return string
   */
  public static function random($length = 16)
  {
      $string = '';
  
      while (($len = strlen($string)) &lt; $length) {
          $size = $length - $len;
  
          $bytes = static::randomBytes($size);
  
          $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);
      }
  
      return $string;
  }
  
  /**
   * Generate a more truly "random" bytes.
   *
   * @param  int  $length
   * @return string
   */
  public static function randomBytes($length = 16)
  {
      return random_bytes($length);
  }
  </code></pre>
  
  <p>i use php 7. I also change random_bytes by openssl_random_pseudo_bytes(), it's work but i have another error that the framework can't generate hash for password. So i think openssl_random_bytes is not the best solution.</p>
  
  <p>If someone can help.</p>
  
  <p>Thanks</p>