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