本文整理汇总了PHP中Illuminate\Auth\Passwords\PasswordBrokerManager类的典型用法代码示例。如果您正苦于以下问题:PHP PasswordBrokerManager类的具体用法?PHP PasswordBrokerManager怎么用?PHP PasswordBrokerManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PasswordBrokerManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setDefaultDriver
/**
* Set the default password broker name.
*
* @param string $name
* @return void
* @static
*/
public static function setDefaultDriver($name)
{
\Illuminate\Auth\Passwords\PasswordBrokerManager::setDefaultDriver($name);
}
示例2: createUserProvider
/**
* 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);
}
示例3: resetUserPassword
/**
* 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'));
}