title: Laravel 5.6 how to read text file line by line
body: <p>Without Laravel I can use simple code to read text file by line:</p>
  
  <pre><code>$file = fopen("whatever/file.txt", "r") or exit("Unable to open file!");
  
  while(!feof($file)) {
     echo fgets($file). "&lt;br&gt;";
  }
  
  fclose($file);
  </code></pre>
  
  <p>With Laravel this simple thing becomes overwhelming due to local file storage location.</p>
  
  <p>I.e. I can get file contents with <code>Storage::get('whatever/file.txt')</code> method, but how to get just a file and then read it in a loop?</p>
  
  <p>I've tried to use <code>File::get('whatever/file.txt')</code> method but get an error: <code>File does not exist at path</code>.</p>
  
  <p>How to read file from local storage (not public) line by line with Laravel?</p>