Skip to content

Commit

Permalink
added redirect function
Browse files Browse the repository at this point in the history
  • Loading branch information
Matix-Media committed Jul 25, 2020
1 parent ef895a9 commit ba6de1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions requires/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,12 @@ public static function load_view($view, $body_page = null, $title = null, $argum
Utils::display_error("Unable to load/generate view \"$view\".", $ex);
}
}

public static function redirect($location)
{
// Set header
header("Location: $location");
// Die, so no more content gets rendered
die();
}
}

0 comments on commit ba6de1e

Please sign in to comment.