CodeIgniter Forums
Is it possible to change the folder name of the controllers and models - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Is it possible to change the folder name of the controllers and models (/showthread.php?tid=63137)



Is it possible to change the folder name of the controllers and models - lionking - 09-29-2015

I want to change the folders name of controllers and models, as you can do it with views folder.
I know I can create a folder inside controllers folder, and then I must changeĀ $routing['directory'] = ''
to the folder name that I have created before, but this is not good way.
I want for example change the name of controllers folder from "controllers" to "modules", and also the same way with "models".



RE: Is it possible to change the folder name of the controllers and models - Martin7483 - 09-30-2015

Why would you want to do that?


RE: Is it possible to change the folder name of the controllers and models - Narf - 09-30-2015

No, you can't.


RE: Is it possible to change the folder name of the controllers and models - lionking - 09-30-2015

I want to change the structure of application directories to something more organized.
I am considering of modifying the core of framework, but I don't know if this behavior is right or wrong.


RE: Is it possible to change the folder name of the controllers and models - Martin7483 - 09-30-2015

If you don't like this MVC structure, maybe you should consider using something other than CodeIgniter?


RE: Is it possible to change the folder name of the controllers and models - Muzikant - 09-30-2015

I found an old thread on Stack Overflow. I do not know if it is working, but you could take an inspiration from it. But anyway, is it worth an effort for something like this? :-)

Your customers will probably not see this or do not care about it. And you can create directory links on localhost for yourself, but be careful if you will choose this solution, because you can not use them on FTP server.


RE: Is it possible to change the folder name of the controllers and models - lionking - 09-30-2015

Anyway I thank you Mr [Muzikant] to try to help me.
Also thank you Mr [Martin7483].