title: Getting NotFoundHttpException in RouteCollection.php in Laravel 5
body: <p>I'm trying out Laravel/just started/ and I'm stuck on <strong>NotFoundHttpException</strong>.  Ithin I've confirmed everything I've read about, but I probably made a mistake somewhere.  I'd be thankful for any tips.  Parts of my current workspace:<br>
  <strong>routes.php</strong>  </p>
  
  <pre><code>&lt;?php
  // Controllers
  Route::controller('auth', 'Auth\AuthController');
  
  Route::get('/', ['middleware' =&gt; 'auth', 'uses' =&gt; 'HomeController@index']);
  
  // route to show the login form
  Route::get('auth/login', array('uses' =&gt; 'HomeController@showLogin'));
  
  // route to process the form
  Route::post('auth/login', array('uses' =&gt; 'HomeController@doLogin'));
  </code></pre>
  
  <p><strong>HomeController.php</strong>  </p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Support\Facades\Validator;
  use Illuminate\Support\Facades\Input;
  use Illuminate\Support\Facades\Auth;
  use App\Article;
  use App\PhotoAlbum;
  use DB;
  
  class HomeController extends Controller {
  
      public function __construct()
      {
          $this-&gt;middleware('auth');
      }
  
      /**
       * Show the application dashboard to the user.
       *
       * @return Response
       */
      public function index() {
          return view ( 'pages.home' );
      }
      public function showLogin() {
          // show the form
          return view( 'auth.login' );
      }
      public function doLogin() {
          // validate the info, create rules for the inputs
          $rules = array (
                  'email' =&gt; 'required|email', // make sure the email is an actual email
                  'password' =&gt; 'required|alphaNum|min:3' 
          ) // password can only be alphanumeric and has to be greater than 3 characters
  ;
  
          // run the validation rules on the inputs from the form
          $validator = Validator::make ( Input::all (), $rules );
  
          // if the validator fails, redirect back to the form
          if ($validator-&gt;fails ()) {
              return Redirect::to ( 'auth.login' )-&gt;withErrors ( $validator )-&gt; // send back all errors to the login form
  withInput ( Input::except ( 'password' ) ); // send back the input (not the password) so that we can repopulate the form
          } else {
  
              // create our user data for the authentication
              $userdata = array (
                      'email' =&gt; Input::get ( 'email' ),
                      'password' =&gt; Input::get ( 'password' ) 
              );
  
              // attempt to do the login
              if (Auth::attempt ( $userdata )) {
  
                  // validation successful!
                  // redirect them to the secure section or whatever
                  // return Redirect::to('secure');
                  // for now we'll just echo success (even though echoing in a controller is bad)
                  echo 'SUCCESS!';
              } else {
  
                  // validation not successful, send back to form
                  return Redirect::to ( 'auth.login' );
              }
          }
      }
  }  
  </code></pre>
  
  <p><strong>home.blade.php</strong>  </p>
  
  <pre><code>@extends('master')
  @section('title') Home :: @parent @stop
  @section('maphead')
      @include('partials.maphead')        
  @endsection
  @stop
  
  @section('sidebarhead')
      @include('partials.sidebarhead')
  @endsection
  @stop
  
  @section('nav')
      @include('partials.nav')
  @endsection
  @stop  
  
  @section('content')
  &lt;!-- Page Content --&gt;
              &lt;div class="container-fluid"&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-lg-12"&gt;
                          &lt;div id="map"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  &lt;!-- /#page-content-wrapper --&gt;
  
  @endsection
  @stop
  
  @section('footer')    
      @include('partials.footer')
  @endsection
  @stop  
  
  @section('mapinitialize')
      @include('partials.mapinitialize')
  @endsection
  @stop
  </code></pre>
  
  <p>Structure<br>
  <a href="https://i.stack.imgur.com/yhzFs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yhzFs.png" alt="My structire"></a>  </p>
  
  <p>The login is ok but after logging in - NotFoundHttpException in RouteCollection.php<br>
  And it directes me to <em>public/login</em> instead of <em>public/home</em><br>
  Thanks in advance!</p>
  
  <p><strong>Edit</strong> - added log</p>
  
  <pre><code>[2015-11-10 09:09:55] local.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:161
  Stack trace:
  #0 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Routing\Router.php(746): Illuminate\Routing\RouteCollection-&gt;match(Object(Illuminate\Http\Request))
  #1 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Routing\Router.php(655): Illuminate\Routing\Router-&gt;findRoute(Object(Illuminate\Http\Request))
  #2 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Routing\Router.php(631): Illuminate\Routing\Router-&gt;dispatchToRoute(Object(Illuminate\Http\Request))
  #3 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(236): Illuminate\Routing\Router-&gt;dispatch(Object(Illuminate\Http\Request))
  #4 [internal function]: Illuminate\Foundation\Http\Kernel-&gt;Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
  #5 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
  #6 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
  #7 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken-&gt;handle(Object(Illuminate\Http\Request), Object(Closure))
  #8 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
  #9 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
  #10 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession-&gt;handle(Object(Illuminate\Http\Request), Object(Closure))
  #11 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
  #12 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(62): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
  #13 [internal function]: Illuminate\Session\Middleware\StartSession-&gt;handle(Object(Illuminate\Http\Request), Object(Closure))
  #14 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
  #15 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
  #16 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse-&gt;handle(Object(Illuminate\Http\Request), Object(Closure))
  #17 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
  #18 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(59): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
  #19 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies-&gt;handle(Object(Illuminate\Http\Request), Object(Closure))
  #20 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
  #21 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(42): Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
  #22 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode-&gt;handle(Object(Illuminate\Http\Request), Object(Closure))
  #23 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
  #24 [internal function]: Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
  #25 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
  #26 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(122): Illuminate\Pipeline\Pipeline-&gt;then(Object(Closure))
  #27 D:\Dev\Cloud\OneDrive\Projects\GH\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(87): Illuminate\Foundation\Http\Kernel-&gt;sendRequestThroughRouter(Object(Illuminate\Http\Request))
  #28 D:\Dev\Cloud\OneDrive\Projects\GH\public\index.php(54): Illuminate\Foundation\Http\Kernel-&gt;handle(Object(Illuminate\Http\Request))
  #29 {main}  
  </code></pre>