title: Laravel Auth Login form redirect when already Login
body: <p>I am using Laravel 5.2. And I want to ask a question. How to change redirect login form on laravel when we already do login ? I am using auth from Php artisan make:auth. here is what I mean :</p>
  
  <ul>
  <li>I already login and redirect to localhost:8000/admin</li>
  <li>then I open again localhost:8000/login . it will redirect to "/" or localhost:8000/</li>
  <li>my question is how to change that "/" to "/admin" ? so even I already logged in and when I want to open localhost:8000/login, I dont want it redirect to "/" but to "/admin" or localhost:8000/admin</li>
  </ul>
  
  <p>I think its on AuthController so here is my AuthController :</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Auth;
  
  use App\User;
  use Validator;
  use App\Http\Controllers\Controller;
  use Illuminate\Foundation\Auth\ThrottlesLogins;
  use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
  
  class AuthController extends Controller
  {
      /*
      |--------------------------------------------------------------------------
      | Registration &amp; Login Controller
      |--------------------------------------------------------------------------
      |
      | This controller handles the registration of new users, as well as the
      | authentication of existing users. By default, this controller uses
      | a simple trait to add these behaviors. Why don't you explore it?
      |
      */
  
      use AuthenticatesAndRegistersUsers, ThrottlesLogins;
  
      /**
       * Where to redirect users after login / registration.
       *
       * @var string
       */
      // protected $redirectPath = '/admin';
      protected $redirectTo = '/admin';
      protected $redirectAfterLogout = '/login';
      /**
       * Create a new authentication controller instance.
       *
       * @return void
       */
      public function __construct()
      {
          $this-&gt;middleware($this-&gt;guestMiddleware(), ['except' =&gt; 'logout']);
      }
  
      /**
       * Get a validator for an incoming registration request.
       *
       * @param  array  $data
       * @return \Illuminate\Contracts\Validation\Validator
       */
      protected function validator(array $data)
      {
          return Validator::make($data, [
              'name' =&gt; 'required|max:255',
              'email' =&gt; 'required|email|max:255|unique:users',
              'password' =&gt; 'required|min:6|confirmed',
          ]);
      }
  
      /**
       * Create a new user instance after a valid registration.
       *
       * @param  array  $data
       * @return User
       */
      protected function create(array $data)
      {
          return User::create([
              'name' =&gt; $data['name'],
              'email' =&gt; $data['email'],
              'password' =&gt; bcrypt($data['password']),
          ]);
      }
  }
  </code></pre>
  
  <p>when I search what is Route::auth() I found this :</p>
  
  <pre><code>$this-&gt;get('login', 'Auth\AuthController@showLoginForm');
  $this-&gt;post('login', 'Auth\AuthController@login');
  $this-&gt;get('logout', 'Auth\AuthController@logout');
  
  // Registration Routes...
  $this-&gt;get('register', 'Auth\AuthController@showRegistrationForm');
  $this-&gt;post('register', 'Auth\AuthController@register');
  
  // Password Reset Routes...
  $this-&gt;get('password/reset/{token?}', 'Auth\PasswordController@showResetForm');
  $this-&gt;post('password/email', 'Auth\PasswordController@sendResetLinkEmail');
  $this-&gt;post('password/reset', 'Auth\PasswordController@reset');
  </code></pre>
  
  <p>So I think the problem is on 'Auth\AuthController@showLoginForm'. then on AuthController I cannot found </p>
  
  <pre><code>public function showLoginForm {}
  </code></pre>
  
  <p>so if I want to do something with this function what must I do ?? its look like if I am already login then redirect to /admin else do login(or redirect to /login)</p>
  
  <p>and here is my Route :</p>
  
  <pre><code>Route::get('/', function () {
      return view('welcome');
  });
  
  //admin
  Route::get('admin', function() {
      return view('admin.index');
  });
  
  //login
  Route::auth();
  Route::get('/home', 'HomeController@index');
  </code></pre>
  
  <p>Thanks for your reply.</p>