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 flash()
 {
     self::init();
     Session::flash('_old_input', self::$data);
 }