title: Password reset in Laravel by email or mobile
body: <p>By default Laravel 5.5's password reset system works on email, but I need to add support for a mobile number (verify by OTP and generate a token and redirect to password reset page). I am doing all this part and I have created a mobile column on password_resets table. </p>
  
  <p>But the problem is <code>\Illuminate\Auth\Passwords\DatabaseTokenRepository</code> &amp;&amp; <code>\Illuminate\Auth\Passwords\TokenRepositoryInterface</code> ON <code>exist</code> method and it doesn't seem configurable. </p>
  
  <pre><code>public function exists(CanResetPasswordContract $user, $token)
  {
      $record = (array) $this-&gt;getTable()-&gt;where(
          'email', $user-&gt;getEmailForPasswordReset()
      )-&gt;first();
  
      return $record &amp;&amp;
             ! $this-&gt;tokenExpired($record['created_at']) &amp;&amp;
               $this-&gt;hasher-&gt;check($token, $record['token']);
  }
  </code></pre>
  
  <p>I need to override that method. There's so much inheritance going on.
  What classes do I need to extend and how to override that method. </p>