title: How to override reset and validatePasswordWithDefaults in PasswordBroker Laravel 5
body: <p>I'm really new to this framework, and it seem so magic to me.
  I can't even find where it call the function reset() in route and controller.
  but I know it's been call before controller after browsing around the googles for whole day.</p>
  
  <p>Here's the problem,
  I've been testing to override function reset and function validatePasswordWithDefaults in PasswordBroker</p>
  
  <p>I do it by extends PasswordBroker, but seem like I have to fully migrate all the function in Illuminate\Auth\Passwords\PasswordBroker into my
  App\Services\PasswordBroker else i will hit error:</p>
  
  <pre><code>Target [Illuminate\Contracts\Auth\UserProvider] is not instantiable
  </code></pre>
  
  <p>My sample code is here:</p>
  
  <p>Custom PasswordServiceProviders that bind my PasswordBroker to Illuminate PasswordBroker:</p>
  
  <pre><code>&lt;?php namespace App\Providers;
  
  use Illuminate\Support\ServiceProvider;
  
  class PasswordResetServiceProvider extends ServiceProvider {
  
  /**
   * Bootstrap the application services.
   *
   * @return void
   */
  public function boot()
  {
      //
  }
  
  /**
   * Register the application services.
   *
   * @return void
   */
  public function register()
  {
      //
      $this-&gt;app-&gt;bind(
          'Illuminate\Contracts\Auth\PasswordBroker','App\Services\PasswordBroker'
          );
  
  
  }
  
  }
  
  Custom PasswordBroker:
  &lt;?php
      namespace App\Services;
  
  
      use Illuminate\Contracts\Auth\UserProvider;
      use Illuminate\Auth\Passwords\TokenRepositoryInterface;
      use Illuminate\Auth\Passwords\PasswordBroker as BasePasswordBroker;
      use Illuminate\Contracts\Auth\PasswordBroker as ContractPasswordBroker;
  
      use Closure;
  
      class PasswordBroker extends BasePasswordBroker
      {
  
          public function reset(array $credentials, Closure $callback)
          {
              dd($callback);
              $user = $this-&gt;validateReset($credentials);
  
              if ( ! $user instanceof CanResetPasswordContract)
              {
                  return $user;
              }
  
              $pass = $credentials['password'];
  
              call_user_func($callback, $user, $pass);
  
              $this-&gt;tokens-&gt;delete($credentials['token']);
  
              return PasswordBrokerContract::PASSWORD_RESET;
          }
  
          protected function validatePasswordWithDefaults(array $credentials)
          {
              list($password, $confirm) = [
                  $credentials['password'], $credentials['password_confirmation'],
              ];
  
              return $password === $confirm &amp;&amp; mb_strlen($password) &gt;= 4;
          }
      }
      ?&gt;
  </code></pre>