diff --git a/.env b/.env index beeb5a1..f36f481 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ # Base application configs APP_NAME="My App" APP_URL=http://localhost:8000/ -APP_VERSION="1.0.0" +APP_VERSION="1.1.0" # database configs DB_HOST="localhost" diff --git a/.env.example b/.env.example index 5447b61..1f7d09c 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,8 @@ # This file contains the example environment variables for the application # Base application configs APP_NAME="" -APP_URL=http://localhost:8000/ -APP_VERSION="1.0.0" +APP_URL="http://localhost:8000/" +APP_VERSION="1.1.0" # database configs DB_HOST="" diff --git a/App/routes.php b/App/routes.php index 9c69495..6182715 100644 --- a/App/routes.php +++ b/App/routes.php @@ -2,10 +2,9 @@ namespace ZenithPHP\App; -use ZenithPHP\App\InitEnv; -use ZenithPHP\App\Router; // Correct namespace for Router +use ZenithPHP\Core\Http\InitEnv; +use ZenithPHP\Core\Http\Router; InitEnv::load(); - - +// Correct namespace for Router Router::get('/', 'WelcomeController', 'index'); \ No newline at end of file diff --git a/App/InitEnv.php b/Core/src/Http/InitEnv.php similarity index 86% rename from App/InitEnv.php rename to Core/src/Http/InitEnv.php index 00d1088..499df6e 100644 --- a/App/InitEnv.php +++ b/Core/src/Http/InitEnv.php @@ -2,7 +2,7 @@ // InitEnv.php -namespace ZenithPHP\App; +namespace ZenithPHP\Core\Http; use Dotenv\Dotenv; @@ -11,7 +11,7 @@ class InitEnv public static function load(): void { // This loads the .env file located in the current directory (__DIR__) - $dotenv = Dotenv::createImmutable(__DIR__ . '/../'); + $dotenv = Dotenv::createImmutable(__DIR__ . '/../../../'); $dotenv->load(); // DB info using $_ENV diff --git a/App/Router.php b/Core/src/Http/Router.php similarity index 98% rename from App/Router.php rename to Core/src/Http/Router.php index 7d23f5b..8e0b512 100644 --- a/App/Router.php +++ b/Core/src/Http/Router.php @@ -1,6 +1,6 @@