Saturday, February 21, 2015

Re: Multiple Rest Methods in Cake3

I've resorted to using the following codes:

$routes->extensions(['json']);
$routes->connect('/api/:controller/:action/*', []);

That way, I can specify any name for the action in the controller. Is this advisable as a way to do API?

On Saturday, 21 February 2015 17:26:55 UTC+8, ProFire wrote:
Hi,

I have been reading up on the Cake Tutorial for REST:http://book.cakephp.org/3.0/en/development/rest.html
It seems to be working great.

I have plans to implement more than the 6 available methods in http://book.cakephp.org/3.0/en/development/routing.html#resource-routes
Such as: checkPassword, validateEmail, uploadAudio, uploadVideo, etc...

But I'm not sure how to do so. Is there any tutorial that I can follow?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: