title: How can I change the landing page after a success Laravel login?
body: <p>I am absolutly new in <strong>Laravel</strong> and I have the following problem. I am using <strong>Laravel 5.3</strong>.</p>
  
  <p>When I perform the login from my login page it automatically land me on this <strong>home</strong> page:</p>
  
  <pre><code>http://localhost:8000/home
  </code></pre>
  
  <p>My doubt is: how can I change the landing page after a success login?</p>
  
  <p>I have these routes:</p>
  
  <pre><code>Andrea@Andrea-PC MINGW64 ~/Documents/Betrivius/WorkSpace/betriviusExtranet (master)
  $ php artisan route:list
  +--------+----------+------------------------+----------+------------------------------------------------------------------------+--------------+
  | Domain | Method   | URI                    | Name     | Action                                                                 | Middleware   |
  +--------+----------+------------------------+----------+------------------------------------------------------------------------+--------------+
  |        | GET|HEAD | /                      |          | App\Http\Controllers\LoginBetriviusController@index                    | web          |
  |        | GET|HEAD | api/user               |          | Closure                                                                | api,auth:api |
  |        | POST     | doLogin                |          | App\Http\Controllers\LoginBetriviusController@doLogin                  | web          |
  |        | GET|HEAD | home                   |          | App\Http\Controllers\HomeController@index                              | web,auth     |
  |        | POST     | login                  |          | App\Http\Controllers\Auth\LoginController@login                        | web,guest    |
  |        | GET|HEAD | login                  | login    | App\Http\Controllers\Auth\LoginController@showLoginForm                | web,guest    |
  |        | POST     | logout                 | logout   | App\Http\Controllers\Auth\LoginController@logout                       | web          |
  |        | POST     | password/email         |          | App\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail  | web,guest    |
  |        | GET|HEAD | password/reset         |          | App\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm | web,guest    |
  |        | POST     | password/reset         |          | App\Http\Controllers\Auth\ResetPasswordController@reset                | web,guest    |
  |        | GET|HEAD | password/reset/{token} |          | App\Http\Controllers\Auth\ResetPasswordController@showResetForm        | web,guest    |
  |        | GET|HEAD | register               | register | App\Http\Controllers\Auth\RegisterController@showRegistrationForm      | web,guest    |
  |        | POST     | register               |          | App\Http\Controllers\Auth\RegisterController@register                  | web,guest    |
  +--------+----------+------------------------+----------+------------------------------------------------------------------------+--------------+
  </code></pre>
  
  <p>So I tried to modify my <strong>LoginController</strong> (related to the <strong>App\Http\Controllers\Auth</strong> namespace) changing this value from:</p>
  
  <pre><code>protected $redirectTo = '/home';
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>protected $redirectTo = '/dashboard-hotel';
  </code></pre>
  
  <p>where <strong>dashboard-hotel</strong> represents the <strong>dashboard-hotel.php</strong> view that I want to open just after a success login.</p>
  
  <p>But doing in this way I obtain the following error message:</p>
  
  <pre><code>NotFoundHttpException in RouteCollection.php line 161:
  in RouteCollection.php line 161
  at RouteCollection-&gt;match(object(Request)) in Router.php line 766
  at Router-&gt;findRoute(object(Request)) in Router.php line 621
  at Router-&gt;dispatchToRoute(object(Request)) in Router.php line 607
  at Router-&gt;dispatch(object(Request)) in Kernel.php line 268
  at Kernel-&gt;Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
  at CheckForMaintenanceMode-&gt;handle(object(Request), object(Closure)) in Pipeline.php line 137
  at Pipeline-&gt;Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
  at Pipeline-&gt;Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
  at Pipeline-&gt;then(object(Closure)) in Kernel.php line 150
  at Kernel-&gt;sendRequestThroughRouter(object(Request)) in Kernel.php line 117
  at Kernel-&gt;handle(object(Request)) in index.php line 54
  at require_once('C:\Users\Andrea\Documents\Betrivius\WorkSpace\betriviusExtranet\public\index.php') in server.php line 21
  </code></pre>
  
  <p>This is my <strong>/routes/web.php</strong> file content:</p>
  
  <pre><code>&lt;?php
  
  /*
  |--------------------------------------------------------------------------
  | Web Routes
  |--------------------------------------------------------------------------
  |
  | This file is where you may define all of the routes that are handled
  | by your application. Just tell Laravel the URIs it should respond
  | to using a Closure or controller method. Build something great!
  |
  */
  
  Route::get('/', 'LoginBetriviusController@index');
  
  Route::post('/doLogin', 'LoginBetriviusController@doLogin');
  
  Auth::routes();
  
  Route::get('/home', 'HomeController@index');
  </code></pre>
  
  <p>So, what is wrong? What am I missing? How can I fix this issue?</p>