Hi,
I have an API folder in controller directory (frontend)
Just an example:
apps
|-- frontend
|... |-- controllers
|... |... |-- api
|... |... |.... `-- API1Controller.php
|... |... |.... `-- API2Controller.php
|... |... |.... `-- API3Controller.php
|... |... `-- Posts1Controller.php
|... |... `-- Posts2Controller.php
|... |... `-- Posts3Controller.php
|... |... `-- Posts4Controller.php
|-- backend
|
and in my register Namespaces:
$loader = new Loader();
$loader->registerNamespaces(array(
'Apps\Main\Controllers' => __DIR__ . '/controllers/',
'Apps\Main\Controllers\API' => __DIR__ . '/controllers/api/',
'Apps\Main\Models' => __DIR__ . '/models/',
'Apps\Main\Forms' => __DIR__ . '/forms/',
'Multiple\Frontend\Libraries' => __DIR__ . '/library/'
));
$loader->register();
and in API1Controller.php file I add this code:
namespace Apps\Main\Controllers\API;
but doesn't work
why ?
sry for bad type english