title: Laravel one page auth (this same field name)
body: <p>How can I add custom error bags to deafault auth in laravel? Because I have two forms (login and registration) on one page and If user make mistake he should see error below correct input but both forms have this same names.</p>
  
  <p>I don't want integrate in vendor files.</p>
  
  <p>I know how to solve this problem, only need to edit:</p>
  
  <pre><code>vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php
  </code></pre>
  
  <p>and add error bags:</p>
  
  <pre><code>protected function sendFailedLoginResponse(Request $request)
  {
      return redirect()-&gt;back()
          -&gt;withInput($request-&gt;only($this-&gt;username(), 'remember'))
          -&gt;withErrors([
              $this-&gt;username() =&gt; Lang::get('auth.failed'),
          ], 'login' &lt;--);
  }
  </code></pre>
  
  <p><strong>But how can I do it without edit vendor files?</strong></p>