title: Laravel can't find class in namespace
body: <p><strong>Problem.</strong>
  When I instantiate an class object from an another namespace (within my controller) I get this error:</p>
  
  <pre><code>ReflectionException in Container.php line 794:
  Class App\Library\Transformers\LessonTransformer does not exist
  </code></pre>
  
  <p>Any ideas what could be wrong? </p>
  
  <p><strong>App\Http\Controllers\LessonsController.php</strong></p>
  
  <pre><code>namespace App\Http\Controllers;
  use Illuminate\Http\Request;
  use Illuminate\Http\Response;
  use App\Library\Transformers\Transformer;
  use App\Library\Transformers\LessonTransformer;
  use App\Http\Requests;
  use App\Lesson;
  class LessonsController extends Controller{
  protected $lessonTransformer;
  
  function __construct(LessonTransformers $lessonTransformer)
  {
      $this-&gt;lessonTransformer = $lessonTransformer;
  }
  
  //
  public function index()
  {
      $lessons =  Lesson::all();
  
      return Response()-&gt;json([
          'data' =&gt; $this-&gt;lessonTransformer-&gt;transformCollection($lessons-&gt;all() )
      ], 200);
  }
  
  public function show($id)
  {
      $lesson = Lesson::find($id);
  
      if ( ! $lesson )
      {
          return Response()-&gt;json([
              'error' =&gt; [
                  'message' =&gt; 'Lesson does not exist'
              ]
          ], 404);
      }
  } }
  </code></pre>
  
  <p><strong>App\Library\Transformers\LessonTransformer</strong></p>
  
  <pre><code>&lt;?php
  namespace App\Library\Transformers;
  
  public class LessonTransformer extends Transformer {
  
      public function transform($lesson)
      {
          return [
              'title'     =&gt; $lesson['title'],
              'body'      =&gt; $lesson['body'],
              'active'    =&gt; (boolean) $lesson['some_bool']
          ];
      }
  }
  </code></pre>
  
  <p><strong>App\Library\Transformers\Transformer</strong></p>
  
  <pre><code>&lt;?php
  namespace App\Library\Transformers;
  
  public abstract class Transformer {
      public function transformCollection(array $item)
      {
          return array_map([$this, 'transform'], $item-&gt;toArray());
      }
  
      public abstract function transform($item);
  }
  </code></pre>
  
  <p><strong>Composer.json</strong></p>
  
  <p>I have also tried to change composer.json like this, but without success:</p>
  
  <pre><code>"autoload": {
          "classmap": [
              "database",
              "App/Library"
          ],
          "psr-4": {
              "App\\": "app/"
          }
      },
      "autoload-dev": {
          "classmap": [
              "tests/TestCase.php",
              "App/Library"
          ]
      },
  </code></pre>
  
  <p><strong>Sidenote</strong>.
  I am using Laravel 5.2.</p>