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


PHP Redirect::Back方法代碼示例

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


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

示例1: postConnexion

 /**
  * Store a newly created resource in storage.
  *
  * @Post("/connecter")
  * @return Redirect
  */
 public function postConnexion(Request $request)
 {
     /*return json_encode(Auth::attempt(['email' => $request->email, 'password' => $request->pwd]));*/
     if (Auth::attempt(['email' => $request->email, 'password' => $request->pwd])) {
         return redirect()->intended('/');
     } else {
         return Redirect::Back();
     }
     /*return json_encode(Auth::attempt(['email' => Input::get('email'), 'password' => Input::get('password')]));*/
 }
開發者ID:abasslassdoss,項目名稱:oussama,代碼行數:16,代碼來源:ConnexionController.php

示例2: getEditable

 public function getEditable($decleration_id, $field_name)
 {
     if (!Auth::user() || Auth::user()->role == 100) {
         Redirect::to('/')->send();
     }
     $editable = Editable::checkIfEditable($decleration_id, $field_name);
     if ($editable) {
         Editable::deleteEditable($decleration_id, $field_name);
     } else {
         Editable::create(['decleration_id' => $decleration_id, 'field_name' => $field_name]);
     }
     return Redirect::Back();
 }
開發者ID:nikajorjika,項目名稱:proGoergia,代碼行數:13,代碼來源:AdminController.php

示例3: reset_password

 public function reset_password(Request $request)
 {
     $this->validate($request, ['email' => 'required'], ['email.required' => 'იმეილი სავალდებულოა', 'email.email' => 'არასწორი იმეილი']);
     $email = Input::get('email');
     $user = User::where('email', $email)->first();
     $password = str_random(8);
     $user->update(['password' => $password]);
     $payload = ['user_name' => $user->first_name . ' ' . $user->last_name, 'password' => $password];
     Mail::send('email.reset_password', $payload, function ($m) use($email) {
         $m->from('lsg.gov.ge@gmail.com', 'Edu lsg gov');
         $m->to($email)->subject('Password reset');
     });
     return Redirect::Back();
 }
開發者ID:nikajorjika,項目名稱:proGoergia,代碼行數:14,代碼來源:UserController.php


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