mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
MVC, use predefined configuration in stead of relative path in service conf to ease development/test setup.
This commit is contained in:
parent
dfe4fe64c9
commit
ad089da837
@ -107,9 +107,8 @@ $di->set('config', $config);
|
||||
/**
|
||||
* Setup router
|
||||
*/
|
||||
$di->set('router', function () {
|
||||
|
||||
$routing = new Routing(__DIR__."/../controllers/", "ui");
|
||||
$di->set('router', function () use ($config) {
|
||||
$routing = new Routing($config->application->controllersDir, "ui");
|
||||
$routing->getRouter()->handle();
|
||||
return $routing->getRouter();
|
||||
});
|
||||
|
||||
@ -85,9 +85,8 @@ $di->set('config', $config);
|
||||
/**
|
||||
* Setup router
|
||||
*/
|
||||
$di->set('router', function () {
|
||||
|
||||
$routing = new Routing(__DIR__."/../controllers/", "api");
|
||||
$di->set('router', function () use ($config) {
|
||||
$routing = new Routing($config->application->controllersDir, "api");
|
||||
$routing->getRouter()->handle();
|
||||
return $routing->getRouter();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user