title: What happened to Laravel's redirectTo() method?
body: <p>We can override this property to redirect users after login in LoginController:</p>
  
  <pre><code>protected $redirectTo = '/home';
  </code></pre>
  
  <p>And here is the statement from documentation:</p>
  
  <blockquote>
    <p>If the redirect path needs custom generation logic you may define a
    redirectTo method instead of a redirectTo property:</p>
    
    <p>protected function redirectTo() { <br/>
        // }</p>
  </blockquote>
  
  <p>But it always redirects to <code>'/home';</code> whatever the condition is.</p>
  
  <pre><code>protected function redirectTo()
  {
    if (Auth::user()-&gt;role==0) {
      return '/volunteer';
    } else {
      return '/donor';
    }
  }
  </code></pre>
  
  <p><em>If a method exists it'll use it, otherwise the property will be used.</em> But it looks like property is being used even if the method exists.</p>
  
  <p>However overriding <code>authenticated()</code> or <code>sendLoginResponse()</code> function works fine.</p>
  
  <pre><code>protected function authenticated()
      {
        if (Auth::user()-&gt;role==0) {
          return redirect('/volunteer') ;
        } else {
          return redirect('/donor');
        }
      }
  </code></pre>
  
  <p>What is wrong with <code>redirectTo()</code> method there? Here is the <a href="https://github.com/laravel/framework/blob/7212b1e9620c36bf806e444f6931cf5f379c68ff/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php#L96" rel="noreferrer">GitHub source code</a> to these methods.</p>
  
  <p>I'm using <strong>Laravel version 5.3.28</strong>.</p>