We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

As I avoid this ...

How to avoid repeating both $ this-> request-> is Post and -> Ajax () in my Actions?



58.4k

Could you explain details clearly?

Phalcon allows you to specify the HTTP method for Routes.

Also check out Match Callbacks.

If you're using the Annotations Router, you can do the same things within annotations.