make .env optional
This commit is contained in:
parent
fbfca80dec
commit
3d5a4daab3
1 changed files with 5 additions and 2 deletions
|
@ -8,5 +8,8 @@ if (function_exists('date_default_timezone_set')
|
|||
|
||||
$loader = include dirname(__DIR__) . '/vendor/autoload.php';
|
||||
$loader->add('RetailCrm\\Test', __DIR__);
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/..');
|
||||
$dotenv->load();
|
||||
|
||||
if (file_exists(__DIR__ . '/../.env')) {
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/..');
|
||||
$dotenv->load();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue