作者:blargen
项目:pimplo
/**
* Set the default password broker name.
*
* @param string $name
* @return void
* @static
*/
public static function setDefaultDriver($name)
{
\Illuminate\Auth\Passwords\PasswordBrokerManager::setDefaultDriver($name);
}
作者:andybolan
项目:viaja_segur
/**
* 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);
}
作者:hamjoin
项目:mustar
/**
* 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'));
}