I want to use some JSON API as a remote datasource. I've found a Webservice plugin by UseMuffin.
I have clear install of CakePHP (latest).
After I've followed all of the steps provided in the "Usage" section of this plugin (https://github.com/UseMuffin/Webservice)
I'm stuck on the Unknown repository type "Endpoint". Make sure you register a type before trying to use it. error.
Not sure how to register this type. I've tried
public function beforeFilter(Event $event)
{
$this->modelFactory(
'Endpoint',
['Endpoint', 'factory']
);
$this->loadModel('Articles', 'Endpoint');
}
but got Argument 2 passed to Cake\Controller\Controller::modelFactory() must be callable, array given error.
Endpointfactory should get registered in the dispatcher filter that ships with the plugin. github.com/UseMuffin/Webservice/blob/1.0.2/src/Routing/Filter/… - ndm$this->loadModel('Articles', 'Endpoint');Unknown repository type "Endpoint" error shows up. - user1327