mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-21 18:16:03 +02:00
Small CP api improvement
This commit is contained in:
parent
1a32289121
commit
3bab10e201
1 changed files with 4 additions and 3 deletions
|
@ -47,10 +47,11 @@ $app->any('/api[/{params:.*}]', function (
|
||||||
Response $response,
|
Response $response,
|
||||||
$args
|
$args
|
||||||
) use ($container) {
|
) use ($container) {
|
||||||
|
$db = config('connections');
|
||||||
$config = new Config([
|
$config = new Config([
|
||||||
'username' => 'database-user',
|
'username' => $db['mysql']['username'],
|
||||||
'password' => 'database-pass',
|
'password' => $db['mysql']['password'],
|
||||||
'database' => 'database-name',
|
'database' => $db['mysql']['database'],
|
||||||
'basePath' => '/api',
|
'basePath' => '/api',
|
||||||
]);
|
]);
|
||||||
$api = new Api($config);
|
$api = new Api($config);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue