Use PasswordBroker on controller

Posted 4 years ago by AlexMunoz

Hello everyone,

I want to use the PasswordBroker class on one method of a controller.

I added this line at the top of my controller:

use Illuminate\Contracts\Auth\PasswordBroker;

And on my method:

private function sendPasswordResetEmail($email, PasswordBroker $passwords){
}

But I keep getting the following error: Argument 2 passed to App\Http\Controllers\Admin\PlayerController::sendPasswordResetEmail() must be an instance of Illuminate\Contracts\Auth\PasswordBroker, none given, called in /home/vagrant/Code/soccerbros/app/Http/Controllers/Admin/PlayerController.php on line 52 and defined

Any help is appreciated.

Thank you

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.