title: Unable to AutoLoad Class using Composer
body: <p>I have a project structure that looks like:</p>
  
  <pre><code>app/
  app/models/
  app/controllers/
  app/views/
  public/
  vendor/
  composer.json
  </code></pre>
  
  <p>Inside of app/controllers/IndexController.php, I have:</p>
  
  <pre><code>require '../vendor/autoload.php';
  
  use MyApp\Models\Test;
  
  class IndexController {
  
      public function __construct() {
         $t = new Test(); // can't be found
      }
  }
  </code></pre>
  
  <p>Here's my composer.json:</p>
  
  <pre><code>{
    "require": {
      "aws/aws-sdk-php": "*",
    },
    "autoload": {
      "psr-0": {
          "MyApp": "app/"
      }
    }
  }
  </code></pre>
  
  <p>After updating composer.json, I run composer.phar update to update the generated autoload files.</p>
  
  <p>FYI - I'm not using any type of MVC framework. This is just a custom lightweight structure I like to use for small projects.</p>
  
  <p>How do I fix my project so that I can autoloaded classes from my models folder and use them properly in my controllers?</p>