CodeIgniter Forums
setDefaultController - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: setDefaultController (/thread-77415.html)



setDefaultController - motoroller - 08-28-2020

Can i user DefaultControlle in subfolder like $routes->setDefaultController('Frontend/Home');


RE: setDefaultController - jreklund - 08-28-2020

I'm afraid that's not how it works. You put Home as the name, and it will look for all Home controllers in e.g:
Frontend/Home
Backend/Home
Folder/Home

If you just specify /frontend, /backend, or /folder in your URI.

https://codeigniter.com/user_guide/incoming/controllers.html?highlight=setdefaultcontroller#organizing-your-controllers-into-sub-directories