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

How can I use Application in my Controller?

I want use Application function getModules in my controller,how can use it? thanks!

What I did was to add the application to the DI.

$di->setShared('app', $application);