title: Laravel package not autoloading - Laravel 5.2
body: <p>I'm building a laravel package, but it won't autoload.</p>
  
  <p>This is the autoload section of my package:</p>
  
  <pre><code>"autoload": {
      "classmap": [
          "src"
      ],
      "psr-4": {
          "Doitonlinemedia\\Translatableroutes\\": "src/"
      }
  }
  </code></pre>
  
  <p>Classes are namespaced like <code>Doitonlinemedia\Translatableroutes</code></p>
  
  <p>Folder structure is like:</p>
  
  <pre><code>- vendor
  - - doitonlinemedia
  - - - translatableroutes
  - - - - composer.json
  - - - - src
  - - - - - class1.php
  </code></pre>
  
  <p>I've added the ServiceProvider in app.php like:
  <code>Doitonlinemedia\Translatableroutes\TranslatableRoutesServiceProvider::class</code></p>
  
  <p>But it keeps saying <strong>Class 'Doitonlinemedia\Translatableroutes\TranslatableRoutesServiceProvider' not found</strong></p>
  
  <p>Run <code>composer dump-autoload</code> on every change. </p>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>For development I added: <code>"Doitonlinemedia\\Translatableroutes\\": "packages/doitonlinemedia/translatableroutes/src"</code> to the main composer.json file. But when I require this composer package into a new project I'm getting the above problems.</p>
  
  <p>To try out this package: <a href="https://github.com/doitonlinemedia/TranslatableRoutes" rel="nofollow">https://github.com/doitonlinemedia/TranslatableRoutes</a> and follow the instructions</p>