title: Laravel - Middleware How to change route to our desired page other than Login
body: <p>I m working on fresh laravel project.</p>
  
  <p>I had install the laravel framework through composer then I created a route for testing purpose like this:</p>
  
  <pre><code>Route::get('/', function () {
  return view('pages.home');
   });
  </code></pre>
  
  <p>This worked fine and I got the desired page. Now for understanding middleware I added this line of code:</p>
  
  <pre><code>Route::get('/', function () {
  return view('pages.home');
   })-&gt;middleware('auth');
  </code></pre>
  
  <p>Now its throwing error of </p>
  
  <pre><code>Route [login] not defined.
  </code></pre>
  
  <p>What I know that, it throwing this error because I havent install any voyagers package thats why it not finding <code>'login'</code> route.</p>
  
  <p>But My question is How can I change that <code>Route [login]</code> to my desired page like <code>Route [pages.notauth]</code>.</p>
  
  <p>Please help me for this.</p>