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


PHP Session::keep方法代碼示例

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


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

示例1: create

 public function create()
 {
     if (Session::has('backTo')) {
         Session::keep('backTo');
     }
     // pass it forward
     return view('trigger.create');
 }
開發者ID:michaelkimball,項目名稱:MigraineTracker,代碼行數:8,代碼來源:TriggerController.php

示例2: create

 public function create()
 {
     // keep backtrack token in the session one more step of the way.
     if (Session::has('backTo')) {
         Session::keep('backTo');
     } else {
         Session::flash('backTo', Request::fullUrl());
     }
     return view('medicine.create');
 }
開發者ID:michaelkimball,項目名稱:MigraineTracker,代碼行數:10,代碼來源:MedicineController.php

示例3: edit

 public function edit(Journal $journal)
 {
     // keep backtrack token in the session one more step of the way.
     if (Session::has('backTo')) {
         Session::keep('backTo');
     } else {
         Session::flash('backTo', Request::fullUrl());
     }
     $journal = $journal->load('triggers');
     // Create list with name=>id to use in select2 field.
     $triggers = Auth::user()->triggers()->lists('name', 'id');
     $medicines = Auth::user()->medicines()->lists('name', 'id');
     $common_triggers = CommonTriggers::all()->lists('name', 'id');
     //        $pain_locations = PainLocations::all()->lists('name', 'id');
     return view('journal.edit', compact('journal', 'common_triggers', 'triggers', 'medicines'));
 }
開發者ID:michaelkimball,項目名稱:MigraineTracker,代碼行數:16,代碼來源:JournalController.php

示例4: getLoginWithGithub

 /**
  * Handle Github login.
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function getLoginWithGithub()
 {
     if (!Input::has('code')) {
         Session::keep(['url']);
         GithubProvider::authorize();
     } else {
         try {
             $user = Github::register(Input::get('code'));
             Auth::login($user);
             if (Session::get('password_required')) {
                 return $this->redirectRoute('user.settings', [], ['update_password' => true]);
             }
             return $this->redirectIntended(route('user.index'));
         } catch (GithubEmailNotVerifiedException $e) {
             return $this->redirectRoute('auth.register', ['github_email_not_verified' => true]);
         }
     }
 }
開發者ID:jacobDaeHyung,項目名稱:laravel-tricks,代碼行數:23,代碼來源:AuthController.php

示例5: getRegistration

 /**
  * If present, returns the RegisterInfoInterface which lets you access the account data
  *
  * @return RegisterInfoInterface|null
  */
 public function getRegistration()
 {
     Session::keep(self::REGISTER_INFO_SESSION);
     return Session::get(self::REGISTER_INFO_SESSION);
 }
開發者ID:ipunkt,項目名稱:social-auth,代碼行數:10,代碼來源:SocialAuthObject.php


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