title: Laravel FileNotFoundException thrown even though file exists
body: <p>I ran into a problem today to which I can't seem to find a solution.</p>
  
  <p>I'm creating a class for image upload. The upload itself works fine, but when I try to use the uploaded file for creating a thumbnail, for some reason the file can't be found.</p>
  
  <p>My code:</p>
  
  <pre><code>private static $imageTypes = [
      "image/jpeg", "image/png", "image/gif", "image/x-ms-bmp"
  ];
  
  public function upload(UploadedFile $file, $folder = 'common')
  {
      if (!$this-&gt;isImage($file)) {
          return false;
      }
  
      $path = $this-&gt;createPath($file, $folder);
  
      try {
          $file-&gt;move($path, $file-&gt;getClientOriginalName());
          $filePath = sprintf("%s/%s", $path, $file-&gt;getClientOriginalName());
      } catch (FileException $e) {
          return false;
      }
  
      $realPath = 'public/' . $filePath;
      //dd(File::exists($realPath)); - this returns false
      //dd(File::get($realPath)); - this throws the exception
      $image = Image::make(File::get($realPath));
  
      // Code for creating a thumbnail - not implemented yet.
      $thumbnailPath = '';
  
      return [
          'image' =&gt; $path,
          'thumbnail' =&gt; $thumbnailPath
      ];
  }
  
  private function isImage(UploadedFile $file)
  {
      $type = $file-&gt;getClientMimeType();
  
      return in_array($type, self::$imageTypes);
  }
  
  private function createPath(UploadedFile $file, $folder)
  {
      $time = Carbon::now();
  
      $path = sprintf(
          'Code/images/uploads/%s/%d-%d',
          $folder,
          $time-&gt;year,
          $time-&gt;month
      );
  
      return $path;
  }
  </code></pre>
  
  <p>I know the file gets uploaded, but I have no idea why it can't be found. I've tried the same action using <code>php artisan tinker</code> and it works there, so the problem is not in the file path.</p>
  
  <p>The only idea that I've come up so far is that is related to directory permissions, but I haven't been able to verify it yet.</p>