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

Routing setup question - "Posts::edit".

Hi,

In the official doc, without warning or explanation:

$router->addGet("/products/edit/{id}", "Posts::edit");

What's "Posts::edit" supposed to mean? API doc says "(string|array) Paths". How's that a path? Why '::' there?

Utterly confusing.

I think you need a wiki page attached to every documentation section, so users could post examples or improve the documentation.

Thanks!



51.4k

ok, I figured it out. "Posts" is a controller name, "edit" is action name.

But I used PHP debugger to figure it out. Not everyone can do that.



98.9k

You can submit a pull request to the docs, if you want to improve an example: https://github.com/phalcon/docs



51.4k

I will be happy to help with the docs, I just need to first fully understand phalcon.