Example #1
0
 static function redirect($uri = null, $withInput = false, $flashData = [])
 {
     Session::reflash();
     if ($withInput) {
         Input::flash();
     }
     foreach ($flashData as $k => $v) {
         Session::flash($k, $v);
     }
     if (!$uri) {
         $uri = Request::referer();
     }
     header('location: ' . $uri);
     return '<p>This page is moved to <a href="' . $uri . '">' . $uri . '</a></p>';
 }
Example #2
0
 static function logout()
 {
     Session::forget('auth');
 }
Example #3
0
 function session($k, $default = '')
 {
     if (is_array($k)) {
         foreach ($k as $sk => $sv) {
             \Boofw\Phpole\Http\Session::put($sk, $sv);
         }
         return null;
     }
     return \Boofw\Phpole\Http\Session::get($k, $default);
 }
Example #4
0
 static function old($k)
 {
     return Session::get('_old_input.' . $k, '');
 }