title: Laravel :How make correct redirect to after login in multiauth
body: <p>I have a problem in multi-auth in laravel</p>
  
  <p>I make route</p>
  
  <pre><code>/admin/login
  </code></pre>
  
  <p>and I need just admin login in this route and redirect to <code>/admin</code> and if user login in it I will redirect to <code>/home</code> and make msg you can not access to this link because of your user, not admin</p>
  
  <p>The problem when I login to <code>/admin/login</code> redirect to <code>/home</code> as the user but I need to be redirected <code>/admin</code></p>
  
  <p>knowing the admin and user same table in the database(user) exit col boolean <code>isAdmin (1 for admin and 0 for user)</code></p>
  
  <p>KNOWING I make <code>Auth\AdminLoginController</code> exit:</p>
  
  <pre><code> protected $redirectTo = '/admin';
  public function __construct()
  {
      $this-&gt;middleware('guest:admin')-&gt;except('logout');
  }
  
   public function Loginadmin()
  {
      return view('auth.login');
  }
  
  public function adminLogin(Request $request)
  {
      $this-&gt;validate($request, [
          'email'   =&gt; 'required|email',
          'password' =&gt; 'required|min:6'
      ]);
            if (Auth::guard('admin')-&gt;Where("isAdmin" , 1)-&gt;attempt(['email' =&gt; $request-&gt;email, 'password' =&gt; $request-&gt;password, 'isAdmin' =&gt; 1], $request-&gt;get('remember'))) {
          return redirect()-&gt;intended('/admin');
      }
      return back()-&gt;withInput($request-&gt;only('email', 'remember'));
  }
  </code></pre>