本文整理汇总了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');
}
示例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('/');
}
示例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');
}
示例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();
}
示例5: logout
public function logout()
{
$user = Auth::user();
if ($user == null) {
return Redirect::back();
}
Auth::logout();
Session::flush();
return redirect('/');
}
示例6: postLogout
public function postLogout()
{
// update last url visited
//
//$this->postUpdate();
// destroy session cookies
//
Session::flush();
return Response::make('SESSION_DESTROYED');
//Auth::logout();
}
示例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;
}
示例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);
}
示例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);
}
示例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]);
}
示例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);
}
示例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');
}
示例13: logout
function logout()
{
Auth::logout();
Session::flush();
return Redirect::to('/work');
}
示例14: SessionFlush
public static function SessionFlush()
{
Session::flush();
}
示例15: doLogout
/**
*
*/
public function doLogout()
{
Session::flush();
return Redirect::to('admin/auth/login');
// redirect the user to the login screen
}