I am Using Craft 3.3.11 version

I have a php file in


and the same file within


When I hit the http://localhost:9001/index.php/api/news.json EapiServices.php from vendor folder is triggered instead of EapiServices.php file from plugin folder.

Can someone help to to make the services files to work within the plugin directory?

  • Have you check your namespacing? – Oli Nov 28 '19 at 20:53
  • Yes, my namespace is craft\element\services and class name is EapiServices but still its throwing "Class 'craft\\elementapi\\services\\EapiService' not found" – Velan Dec 5 '19 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.