07-23-2015, 05:12 PM
I have created a subdirectory called 'admin' in my application/controllers directory. I've got some controllers in there yes sir:
I'm wondering if it's possible to define a default controller::method for that subdirectory in case the url does not specify anything beyond http://example.com/admin
For example, how would I route requests for http://example.com/admin to application/controllers/admin/Dashboard.php?
I really hope I don't have to resort to defining a default controller for every subdirectory in my controllers directory via extensive changes to config/routes.php.
Can anyone tell me if this is possible?
Code:
application/controllers/admin/Dashboard.php
application/controllers/admin/Foo.php
application/controllers/admin/Bar.php
I'm wondering if it's possible to define a default controller::method for that subdirectory in case the url does not specify anything beyond http://example.com/admin
For example, how would I route requests for http://example.com/admin to application/controllers/admin/Dashboard.php?
I really hope I don't have to resort to defining a default controller for every subdirectory in my controllers directory via extensive changes to config/routes.php.
Can anyone tell me if this is possible?