Skip to content

Commit

Permalink
Create Db structure
Browse files Browse the repository at this point in the history
  • Loading branch information
puleeno committed Apr 20, 2024
1 parent 04050d5 commit b150864
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
3 changes: 3 additions & 0 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ protected function setup()
$routes = require __DIR__ . '/../routes/web.php';
$routes($this->app);

$db = require __DIR__ . '/../configs/database.php';
$db($this->container);

// Register routes
$this->app->options('/{routes:.*}', function (Request $request, Response $response) {
// CORS Pre-Flight OPTIONS Request Handler
Expand Down
9 changes: 9 additions & 0 deletions configs/database.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

use DI\Container;

return function (Container $container) {
};

5 changes: 5 additions & 0 deletions configs/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
'level' => Logger::DEBUG,
],
'admin_prefix' => '/dashboard',
'auth' => [
'login' => [
'path' => '/auth/login'
]
]
]);
}
]);
Expand Down
7 changes: 2 additions & 5 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use App\Http\Controllers\StaticFileController;
use Quagga\Quagga\HookManager;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\LoginController;

return function (Application $app) {
$app->any('/extensions/{extensionName:/?.+}/assets/{pagePath:/?.+}', StaticFileController::class);
Expand All @@ -19,11 +20,7 @@
$group->get('/{id}', ViewUserAction::class);
});

var_dump(config('auth.login.path', 'test'));die;
$app->any(config('login.path', '/auth/login'), function(){
die('zo');
});

$app->any(config('auth.login.path'), [LoginController::class, 'auth']);

$app->any(
'/',
Expand Down

0 comments on commit b150864

Please sign in to comment.