.\config\

This commit is contained in:
2021-06-14 17:41:40 -04:00
parent 5ef0aaae50
commit 8da6b4f160
4 changed files with 19 additions and 15 deletions

View File

@ -1,6 +1,7 @@
<?php
include_once dirname(__DIR__) . '/vendor/autoload.php';
include_once 'errors.php';
include_once 'dotenv.php';
include_once 'database.php';
include_once 'routes.php';
?>
?>

12
bootstrap/dotenv.php Normal file
View File

@ -0,0 +1,12 @@
<?php
use Dotenv\Dotenv;
$folder = dirname(__DIR__);
$files = new DirectoryIterator($folder);
foreach ($files as $file) {
if ($file->isDir() or $file->getExtension() != 'env') {
continue;
}
$env = Dotenv::createImmutable($file->getPath(), $file->getBasename());
$env->load();
}