Im new to Laravel / Lumen framework and im trying to replicate the the default reset password trait for Laravel https://laravel.com/docs/5.7/passwords to my Lumen Project. However, I stumbled upon this error when I post to sumbit email endpoints.
Error Encountered {"message":"Target class [auth.password] does not exist."}
My Route
$router->post('password/email', 'AuthController@postEmail');
Methods
public function postEmail(Request $request)
{
return $this->sendResetLinkEmail($request);
}
/**
* Send a reset link to the given user.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function sendResetLinkEmail(Request $request)
{
// We will send the password reset link to this user. Once we have attempted
// to send the link, we will examine the response then see the message we
// need to show to the user. Finally, we'll send out a proper response.
// dd($request->all());
$response = $this->broker()->sendResetLink(
$request->only('email')
);
return $response == Password::RESET_LINK_SENT
? response()->json(true)
: response()->json(false);
}
and it uses this class use Illuminate\Support\Facades\Password;
and I think the error is fired by this method
protected static function getFacadeAccessor()
{
return 'auth.password';
}
}
I saw that this getFacadeAccesor return string is registered in namespace Illuminate\Foundation;
but I can't find this file in my Lumen vendor folder. Any workaround on this? Thank you!