title: Laravel 5 How to work with authentication on two different login forms with different tables
body: <p>I created two different login forms with two different register forms and two different tables ,at the moment i can do the following</p>
  
  <pre><code>Login into table A(users)
  Register into table A(users)
  Register into table B(students)
  </code></pre>
  
  <p>But i can't logon on table B ,is like it is getting confused on which table to logon .I just modified the auth built-in functionality </p>
  
  <p>Here is my code function for login under</p>
  
  <pre><code>     public function postLoginl(Request $request)
  {
      $this-&gt;validate($request, [
          'learnerCell'=&gt; 'required', 'password' =&gt; 'required',
      ]);
  
      $credentials = $this-&gt;getCredentialsl($request);
  
      if (Auth::attempt($credentials, $request-&gt;has('remember'))) {
          return redirect()-&gt;intended($this-&gt;redirectPath());
      }
  
      return redirect($this-&gt;loginPath())
          -&gt;withInput($request-&gt;only('learnerCell', 'remember'))
          -&gt;withErrors([
              'learnerCell' =&gt; $this-&gt;getFailedLoginMessage(),
          ]);
  }
  </code></pre>
  
  <p>When I check on config/auth.php there is a script</p>
  
  <pre><code> &lt;?php
  
    return [
       'driver' =&gt; 'eloquent',
        'model' =&gt; App\User::class,
        'table' =&gt; 'users',
             'password' =&gt; [
      'email' =&gt; 'emails.password',
      'table' =&gt; 'password_resets',
      'expire' =&gt; 60,
    ],
  
  ];
  </code></pre>
  
  <p>of which i think is where the problem lies,because it does not have model to control the login it only references one model (User) and I have another one called (Learner).</p>