title: Laravel / Lumen custom class not found
body: <p>I am experiencing an issue when trying to use a custom, namespaced class in Lumen, the micro-framework by Laravel. I am getting a <code>Class not found</code> error when trying to instantiate the class.</p>
  
  <p>The relative directory:</p>
  
  <pre><code>|--- app
  |    |---Classes
  |    |   |--- GetImages.php &lt; My custom, namespaced class
  |--- Http
  |--- |--- routes.php &lt; Using the class here works
  |    |--- Processors
  |    |    |--- get.php &lt; Using the class here does not work, generates the error (listed below)
  </code></pre>
  
  <p>The <strong>GetImages.php</strong> file, reduced for brevity:</p>
  
  <pre><code>namespace App\Classes;
  
  class GetImages
  {
      public $name = 'Class instantiated';
  }
  </code></pre>
  
  <p>The <strong>get.php</strong> file, where error is occurring:</p>
  
  <pre><code>use App\Classes\GetImages;
  
  $n = new GetImages;
  return $n-&gt;name;
  </code></pre>
  
  <p>If I make an <code>ajax</code> request within the home page like <code>$.get('http://www.example.com/app/Http/Processors/get.php')</code> I get the following error:</p>
  
  <pre><code>Fatal error: Class 'App\Classes\GetImages' not found in http://www.example.com/app/Http/Processors/get.php on line 5.
  </code></pre>
  
  <p>However, as stated above, if I instantiate this class inside the <code>routes.php</code> file, it works properly.</p>
  
  <p>The <strong>autoload</strong> portion of <code>composer.json</code>:</p>
  
  <pre><code>"autoload": {
      "psr-4": {
          "App\\": "app/"
      },
      "classmap": [
          "database/"
      ],
      "files": [
          "app/Http/helpers.php"
      ]
  }
  </code></pre>
  
  <p>I feel this is an autoloading issue, but I have done <code>composer dumpautoload -o</code>, <code>composer update</code>, and followed <code>PSR-4</code> standards, without any change. Any ideas what I'm missing?</p>