当前位置: 首页>>代码示例>>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;未经允许,请勿转载。