title: Laravel 5.5 custom helper file Class become doesn't exists
body: <p>This is my code:</p>
  
  <pre><code>//helpers.php
  if (!function_exists('image_helper')) {
      function image_helper($file = NULL, $path = NULL)
      {
          $image = app('image_helper');
  
          if (!is_null($file) &amp;&amp; is_null($path)) {
              return $image-&gt;generateTmp($file);
          }
  
          return $image;
      }
  }
  
  // ImageHelper.php
  &lt;?php
  
  namespace App\Helpers;
  
  use Illuminate\Http\File;
  use Illuminate\Support\Facades\DB;
  use Illuminate\Support\Facades\Storage;
  use Intervention\Image\Facades\Image;
  use Spatie\ImageOptimizer\OptimizerChainFactory;
  use Symfony\Component\HttpFoundation\File\UploadedFile;
  
  class ImageHelper
  {
      private $fileName, $sizes;
  
      function __construct()
      {
          $this-&gt;fileName = md5(time() . openssl_random_pseudo_bytes(16));
      }
  
      public function get($query, $path, $type)
      {
          $arr = [];
          $sizes = getImageSizes($type);
  
          $picture = $query-&gt;picture()-&gt;first();
  
          if ($picture) {
              foreach ($sizes as $key =&gt; $size) {
                  $url = filter_var($picture-&gt;file, FILTER_VALIDATE_URL) ?
                      $picture-&gt;file :
                      Storage::url($path . $key . '/' . $picture-&gt;file);
  
                  $arr = array_add($arr, $key, $url);
              }
          }
  
          return $arr;
      }
  ?&gt;
  </code></pre>
  
  <p>I've already add at my composer.json:</p>
  
  <pre><code>"autoload": {
  "classmap": [
    "database/seeds",
    "database/factories",
    "app/Helpers/helpers.php"
  ],
  "psr-4": {
    "App\\": "app/"
  },
  "files": [
    "app/Helpers/helpers.php"
  ]
  },
  </code></pre>
  
  <p>When I run this code: <code>image_helper()-&gt;get($query, '/images');</code></p>
  
  <p>I got <code>ReflectionException (-1) Class image_helper does not exist</code></p>
  
  <p>Already do <code>composer dump-autoload</code>, <code>php artisan optimize</code> it still the same.</p>
  
  <p>Previously on Laravel 5.4 it works perfectly.</p>
  
  <p>Any solution?</p>