Hi,
I have the namespace Icon\Controllers
and Icon\Net\Controllers
I'm using $loader->registerNamespaces
to register both namespaces and setting $dispatcher->setDefaultNamespace("Icon\Controllers");
but I don't know how to make Icon\Net\Controllers
accessible
The controllers from Icon\Controllers
are accessible through https://localhost/Controller_Name
I wanted to make \Icon\Net\Controllers
accessible through https://localhost/Controller_Name
as well.
I already tried making it work using routes, by adding these two routes, but they didn't work:
$router->add('/:controller', array(
'controller' => 1
));
$router->add('/:controller', array(
'namespace' => 'Icon\\Net\\Controllers',
'controller' => 1
));