How to create sub folders for controllers, model, and view in Phalcon?

Asked

Viewed 102 times

1

I am looking for a way to put folder levels in the structure of models, views and controllers. The structure I want to mount would be as follows:

inserir a descrição da imagem aqui

I’ve looked and implemented this link but it didn’t work. The error return is as follows:

meuApp\Controllers\SegurancaController handler class cannot be loaded
#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('meuApp\Contr...', 2)
#1 [internal function]: Phalcon\Dispatcher->_dispatch()
#2 [internal function]: Phalcon\Dispatcher->dispatch()
#3 C:\Projetos\meuApp\Source\public\index.php(42): Phalcon\Mvc\Application->handle()
#4 {main}

Any suggestions on how to implement?

  • I can’t say that this is the problem, but generally in linux everything is case-sensitive, maybe Phalcon is also case-sensitive to facilitate portability between linux, mac and linux.

  • @Guilhermenascimento, I suspected this, but I put everything in lowercase letters, only the first case and nothing worked...

  • It may be the namspace that is wrong, post your Routes, because by name meuApp\Controllers\SegurancaController seems to be quite wrong :/

  • @Guilhermenascimento really had an error in the routes and names... I just adjusted, and stopped the error! thanks!

  • I figured by their names, how nice.

1 answer

0

Fixed routes the problem has been solved.

Route nomas were not compatible with the router.php file

Browser other questions tagged

You are not signed in. Login or sign up in order to post.