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


PHP Session::flush方法代碼示例

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


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

示例1: logout

 public function logout()
 {
     Session::flush();
     Auth::logout();
     Session::flash('messages', ["Successfully logged out."]);
     return view('front.index');
 }
開發者ID:SaadQobaa,項目名稱:testing_laravel,代碼行數:7,代碼來源:LoginController.php

示例2: logout

 public function logout()
 {
     Session::flush();
     Session::flash('message', 'You have successfully logged out of the system.');
     Session::flash('alert-class', 'alert-success');
     return Redirect::to('/');
 }
開發者ID:Headrun-php,項目名稱:TLG,代碼行數:7,代碼來源:VaultController.php

示例3: logOut

 public function logOut()
 {
     // Cerramos la sesión
     Auth::logout();
     Session::flush();
     // Destroy all sessions
     // Volvemos al login y mostramos un mensaje indicando que se cerró la sesión
     return Redirect::to('/')->with('error_message', 'Se ha cerrado sesión correctamente');
 }
開發者ID:hanabalonch,項目名稱:am,代碼行數:9,代碼來源:AuthController.php

示例4: logOut

 public static function logOut()
 {
     Session::forget("user_id");
     Session::forget("role");
     Session::forget("project_id_profile_u");
     Session::forget("superuser");
     Session::flush();
     Redirect::to('login')->send();
 }
開發者ID:FPEPOSHI,項目名稱:portLAB_v1.0,代碼行數:9,代碼來源:Utils.php

示例5: logout

 public function logout()
 {
     $user = Auth::user();
     if ($user == null) {
         return Redirect::back();
     }
     Auth::logout();
     Session::flush();
     return redirect('/');
 }
開發者ID:taepras,項目名稱:haii-cueng-web,代碼行數:10,代碼來源:PagesController.php

示例6: postLogout

 public function postLogout()
 {
     // update last url visited
     //
     //$this->postUpdate();
     // destroy session cookies
     //
     Session::flush();
     return Response::make('SESSION_DESTROYED');
     //Auth::logout();
 }
開發者ID:pombredanne,項目名稱:open-swamp,代碼行數:11,代碼來源:SessionController.php

示例7: logout

 public function logout()
 {
     $callback = 'http://' . $_SERVER['HTTP_HOST'];
     $ajax = Request::input('ajax');
     if ($ajax) {
         Session::flush();
         Session::save();
         exit;
     }
     $sso_logout = env('SSO_LOGOUT') . '?callback=' . $callback;
     header('Location:' . $sso_logout);
     exit;
 }
開發者ID:xxtime,項目名稱:boss,代碼行數:13,代碼來源:PublicController.php

示例8: testMetaDataStorage

 public function testMetaDataStorage()
 {
     include 'source/helper.php';
     $meta = laravel_ab_meta();
     Session::forget(config('laravel-ab.cache_key'));
     Session::flush();
     $ab = app()->make('Ab');
     $ab->forceReset();
     Ab::saveSession();
     $instance = Instance::where(['instance' => Ab::getSession()->instance])->get()->first();
     $metadata = $instance->metadata;
     $this->assertTrue(is_array($metadata));
     $this->assertEquals($metadata, $meta);
 }
開發者ID:comocode,項目名稱:laravel-ab,代碼行數:14,代碼來源:AbTests.php

示例9: anyLogout

 public function anyLogout()
 {
     $callback = Request::input('callback');
     $uid = Session::get('uid');
     Session::flush();
     Session::save();
     $domain = $this->authModel->authorized_app_domain($uid);
     $app = '';
     if (is_array($domain)) {
         $app = implode('|', $domain);
     }
     $data['app'] = $app;
     $data['landing'] = $callback;
     return view('api.sso.logout', $data);
 }
開發者ID:xxtime,項目名稱:boss,代碼行數:15,代碼來源:SsoController.php

示例10: init

 public function init(Request $request)
 {
     \Illuminate\Support\Facades\Session::flush();
     $session = new Session();
     $session->CreateTime = time();
     $session->save();
     $departments = Department::where('Type', 'execution')->orderBy('ID', 'ASC')->get();
     $retDepartments = [];
     for ($i = 0, $l = count($departments); $i < $l; $i++) {
         $retDepartments[] = $departments[$i]->toObject();
     }
     $categories = Category::orderBy('ID', 'ASC')->get();
     $retCategories = [];
     for ($i = 0, $l = count($categories); $i < $l; $i++) {
         $retCategories[] = $categories[$i]->toObject();
     }
     return view('index', ['sessionId' => $session->id, 'categories' => $retCategories, 'departments' => $retDepartments]);
 }
開發者ID:TorchmanX,項目名稱:BlueMeanies,代碼行數:18,代碼來源:QuestionController.php

示例11: handle

 /**
  *
  * Only Checks for the role of a user
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     // IF THERE IS NO ROLE SESSION
     if (!Session::get('ROLE.' . Auth::id())) {
         $activeUser = Auth::user()->active;
         if ($activeUser) {
             /*
              * GATHER ALL INFO ABOUT THE USER WITHIN THE CACHE
              * */
             $this->dispatch(new CollectCacheDataForAuthUser($request));
             return $next($request);
         }
         // IN CASE THE USER IS NOT ACTIVE
         Cache::forget('ROLE.' . Auth::id());
         Cache::forget('MODULES.' . Auth::id());
         Cache::forget('ABILITIES.' . Auth::id());
         Session::flush();
         Auth::logout();
         return $next($request);
     }
     return $next($request);
 }
開發者ID:uusa35,項目名稱:ebook,代碼行數:31,代碼來源:AfterUserLoginCollectData.php

示例12: getCompanyLogout

 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getCompanyLogout()
 {
     Auth::travel_company_staff()->logout();
     Session::flush();
     return redirect()->route('company_login');
 }
開發者ID:thomasdola,項目名稱:afrouteWeb,代碼行數:11,代碼來源:AppCompanyStaffAuthenticationController.php

示例13: logout

 function logout()
 {
     Auth::logout();
     Session::flush();
     return Redirect::to('/work');
 }
開發者ID:shahariar007,項目名稱:LaravelTest,代碼行數:6,代碼來源:loginController.php

示例14: SessionFlush

 public static function SessionFlush()
 {
     Session::flush();
 }
開發者ID:rohitbhalani,項目名稱:RB_Test,代碼行數:4,代碼來源:SessionHelper.php

示例15: doLogout

 /**
  *
  */
 public function doLogout()
 {
     Session::flush();
     return Redirect::to('admin/auth/login');
     // redirect the user to the login screen
 }
開發者ID:khoale193,項目名稱:lavarel,代碼行數:9,代碼來源:AuthController.php


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