title: How to change redirect route for unverified user in laravel?
body: <p>I have multiple login <code>user</code>,<code>admin</code>, and <code>client</code>. Authentication is working fine for all users. But I have problem to redirect them to different route when their login session ends, or if they try to access pages without logging in. All of them is redirected to <code>login</code> route.</p>
  
  <p>I know that redirect route is configured in <code>Middleware/Authenticate.php</code>. But I don't know how to modify it to work as I wanted.</p>
  
  <pre><code>&lt;?php
  namespace App\Http\Middleware;
  use Illuminate\Auth\Middleware\Authenticate as Middleware;
  class Authenticate extends Middleware
  {
        protected function redirectTo($request)
        {
           if ($this_is_an_admin){ // How to manage this?
              return route('admin/login');
           }
           elseif ($this_is_a_client){ // How to manage this?
              return route('client/login');
           }
           else {
              return route('login');         
           }
        }
  }
  </code></pre>
  
  <p>So how can I assign different route for each user, for example <code>user</code> goes to <code>user/login</code>, <code>admin</code> goes to <code>admin/login</code> and <code>client</code> goes to <code>client/login</code>.</p>