I have 4 different guards registered in my auth.php
file. I have a single page for resetting the password for users in the four guards. So, while sending the email I manage to figure out which guard to use by sending it through the form.
My ForgotPasswordController.php
protected function guard()
{
return Auth::guard(Input::get('guard'));
}
protected function broker()
{
if (Input::get('guard') == 'web') {
return Password::broker('users');
}
return Password::broker(Input::get('guard'));
}
But in the ResetPasswordController.php
file, I am not able to do the same logic. How can I get the same guard and broker used here in that file? Can I store the guard name in the database along with the password resets token? If yes, How? Please guide me