UI
This commit is contained in:
@ -44,8 +44,8 @@ $container = $builder->build();
|
||||
$app = Bridge::create($container);
|
||||
include_once 'databases.php';
|
||||
|
||||
if ($container->has('base_url')) {
|
||||
$app->setBasePath($container->get('base_url'));
|
||||
if ($container->has('base_path') and $container->get('base_path') !== null) {
|
||||
$app->setBasePath($container->get('base_path'));
|
||||
}
|
||||
$app->addRoutingMiddleware();
|
||||
|
||||
|
@ -1,7 +1,15 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Dotenv\Dotenv;
|
||||
|
||||
if (file_exists(implode(DIRECTORY_SEPARATOR, [dirname(__DIR__, 2), '.env']))) {
|
||||
$dotenv = Dotenv::createImmutable(dirname(__DIR__, 2));
|
||||
$dotenv->load();
|
||||
}
|
||||
|
||||
return [
|
||||
'base_path' => $_ENV['BASE_PATH'] ?? null,
|
||||
'base_url' => $_ENV['BASE_URL'] ?? null,
|
||||
'locations' => DI\decorate(function($prev, Container $container) {
|
||||
$arr = (array) $prev;
|
||||
$arr['base'] = dirname(__DIR__, 2);
|
||||
|
Reference in New Issue
Block a user