As I avoid this ...

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



37.8k

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.