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>';
 }