We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27fb2df commit 7635e44Copy full SHA for 7635e44
app/Libraries/Helper.php
@@ -1,4 +1,6 @@
1
<?php
2
+ use App\Libraries\DotEnv;
3
+ (new DotEnv(BASE_DIR . '/.env'))->load();
4
/**
5
* Generate output in JSON format and terminate the script
6
*
@@ -62,7 +64,7 @@ function view($fileName,$data = null){
62
64
if(! function_exists('route')){
63
65
function route($route){
66
if($route == "")
- return header("Location: http://localhost/hris");
67
+ return header("Location: ".getenv('APP_URL'));
68
header("Location: $route");
69
exit();
70
}
@@ -88,3 +90,7 @@ function notFound(){
88
90
header("HTTP/1.1 404 Not Found");
89
91
exit("URL not found");
92
93
+
94
+ function esc($string){
95
+ return htmlspecialchars($string);
96
+ }
0 commit comments