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

DOC : Forgot autoloader in micro app / REST tutorial

Hi Phalcon !

Just want to notify you that in this tutorial : https://docs.phalcon.io/en/latest/reference/tutorial-rest.html

On the IRC, a php beginer asked why the model Robots was impossible to create.

Actually you never deal with the autoloader !



98.9k

Thanks for pointing it out, It can be an autoloader like the one explained in INVO, (https://docs.phalcon.io/en/latest/reference/tutorial-invo.html#autoloaders) However, I'm going to create a repository for it, thanks



8.9k

@Phalcon , Not sure if it matters much, but I am a beginner too and I was trying to copy some code from the documentations page and I noticed that the first and only "IF" statement in https://docs.phalcon.io/en/latest/reference/dispatching.html#handling-not-found-exceptions is missing the opening curly bracket.

@Metialb : indeed ! That was corrected

index.php <?php $loader = new \Phalcon\Loader(); $loader->registerDirs(array( 'models/' ))->register();