diff --git a/config/app.php b/config/app.php index 83a7908..618364f 100644 --- a/config/app.php +++ b/config/app.php @@ -17,7 +17,7 @@ 'host' => env('DB_HOST') ?? '', 'database' => env('DB_HOST') ?? '', - 'username' => env('DB_USER') ?? '', + 'user' => env('DB_USER') ?? '', 'password' => env('DB_PASSWORD') ?? '', 'dbname' => env('DB_NAME') ?? '', 'driver' => 'pdo_mysql', diff --git a/src/boot.php b/src/boot.php index d0b6ff0..a94d58c 100644 --- a/src/boot.php +++ b/src/boot.php @@ -5,6 +5,10 @@ $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); $whoops->register(); +//Load env files +$dotenv = Dotenv\Dotenv::createImmutable(__DIR__.'/../',); +$dotenv->load(); + $app = new \Scrawler\App(); // Register Woops to handle exceptions @@ -30,7 +34,7 @@ // Register Directories $app->registerAutoRoute(__DIR__ . '/controllers', 'App\Controllers'); -$app->template()->registerDir(__DIR__ . '/views',__DIR__ . '../storage/cache',__DIR__ . '/../assets'); +$app->template()->registerDir(__DIR__ . '/views',__DIR__ . '/../storage/framework/cache',__DIR__ . '/../assets'); $app->storage()->setAdapter(new \Scrawler\Adapters\Storage\LocalAdapter(__DIR__ . '/../storage/app'));