當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PasswordBroker::sendResetLink方法代碼示例

本文整理匯總了PHP中Illuminate\Auth\Passwords\PasswordBroker::sendResetLink方法的典型用法代碼示例。如果您正苦於以下問題:PHP PasswordBroker::sendResetLink方法的具體用法?PHP PasswordBroker::sendResetLink怎麽用?PHP PasswordBroker::sendResetLink使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Illuminate\Auth\Passwords\PasswordBroker的用法示例。


在下文中一共展示了PasswordBroker::sendResetLink方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: postReset

 public function postReset(Request $request, PasswordBroker $broker)
 {
     $credentials = $request->only('email');
     Validator::make($credentials, ['email' => 'required|email']);
     $response = $broker->sendResetLink($credentials, function ($m) {
         $m->subject('Reset Password');
     });
     switch ($response) {
         case PasswordBroker::RESET_LINK_SENT:
             return response()->json('Password reset sent.');
         case PasswordBroker::INVALID_USER:
             return response()->json(trans($response))->setStatusCode(412, 'Invalid User');
     }
 }
開發者ID:fredlawl,項目名稱:planebox-api,代碼行數:14,代碼來源:AuthController.php

示例2: postRemind

 /**
  * Send an email to user if exists with reset instructions
  * @param  AuthRequestInterface $request
  * @param  PasswordBroker       $passwords
  * @return Illuminate\Http\Response
  */
 public function postRemind(AuthRequestInterface $request, PasswordBroker $passwords)
 {
     $response = $passwords->sendResetLink($request->only('email'), function (Message $message) {
         $message->subject(trans('core::auth.emails.remind.subject'));
     });
     switch ($response) {
         case PasswordBroker::RESET_LINK_SENT:
             return $this->reminderWasSent($request);
             break;
         case PasswordBroker::INVALID_USER:
             return $this->reminderWasNotSent($request, $response);
             break;
     }
 }
開發者ID:ruysu,項目名稱:laravel-core,代碼行數:20,代碼來源:ResetsPasswords.php

示例3: sendResetLink

 /**
  * Send a password reset link to a user.
  *
  * @param array $credentials
  * @param \Closure|null $callback
  * @return string 
  * @static 
  */
 public static function sendResetLink($credentials, $callback = null)
 {
     return \Illuminate\Auth\Passwords\PasswordBroker::sendResetLink($credentials, $callback);
 }
開發者ID:tvad911,項目名稱:biquyetmuasam.com,代碼行數:12,代碼來源:_ide_helper.php


注:本文中的Illuminate\Auth\Passwords\PasswordBroker::sendResetLink方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。