I wanted to make an API with versions, but it gives an error:
Class api\modules\v1\Module does not exist It seems all the ways are right. What could it be?
I wanted to make an API with versions, but it gives an error:
Class api\modules\v1\Module does not exist It seems all the ways are right. What could it be?
You do not have the same path where basePath leads and where is the class itself? Here, look
'node' => [ 'class' => 'root\modules\node\Module', 'controllerNamespace' => 'root\modules\node\controllers\backend', 'viewPath' => '@root/modules/node/views/backend', ], module namespace (Module.php): root \ modules \ node; class namespace (DefaultController.php) root \ modules \ node \ controllers \ backend;
Hope this helps you figure it out.
Source: https://ru.stackoverflow.com/questions/580212/
All Articles
namespace api\modules\v1;- Maxim Vlasov