title: Laravel 5: how to put admin controllers in a folder?
body: <p>I'm creating my first admin panel in Laravel 5.  I would like to organize my controllers like:</p>
  
  <pre><code>Http
      Controllers
          Admin
              DashboardController.php
          Controller.php
          WelcomeController.php
  </code></pre>
  
  <p>But I'm having some trouble getting this to work.</p>
  
  <p>DashboardController.php is:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\Http\Controllers\Controller;
  
  class DashboardController extends Controller {
  
      public function index()
      {
          return \View::make('admin/dashboard');
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p>And my routes contain:</p>
  
  <pre><code>Route::group(array('namespace'=&gt;'Admin'), function()
  {
      Route::get('/dashboard', array('as' =&gt; 'dashboard', 'uses' =&gt; 'DashboardController@index'));
  });
  
  // Eventually I will check for authentication using:
  // Route::group(array('before' =&gt; 'auth', 'namespace'=&gt;'Admin'), function()...
  </code></pre>
  
  <p>When I navigate to /dashboard, the error I get is:</p>
  
  <blockquote>
    <p>Class App\Http\Controllers\Admin\DashboardController does not exist</p>
  </blockquote>
  
  <p>Any suggestions?  Thanks!</p>