/** * Set the default password broker name. * * @param string $name * @return void * @static */ public static function setDefaultDriver($name) { \Illuminate\Auth\Passwords\PasswordBrokerManager::setDefaultDriver($name); }
/** * Create the user provider implementation for the driver. * * @param string $provider * @return \Illuminate\Contracts\Auth\UserProvider * @throws \InvalidArgumentException * @static */ public static function createUserProvider($provider) { return \Illuminate\Auth\Passwords\PasswordBrokerManager::createUserProvider($provider); }
/** * Reset a user's password. * * @return \Illuminate\Http\RedirectResponse */ public function resetUserPassword(Request $request, PasswordBrokerManager $broker) { $this->validate($request, ['user_id' => 'required|integer|exists:users']); $user = User::find($request->input('user_id')); $response = $broker->sendResetLink(['user_id' => $user->userId], function (Message $message) { $message->subject(trans('mustard::admin.password_reset_email_subject')); }); return redirect()->back()->withStatus(trans('mustard::admin.password_reset')); }