Reputation: 2350
I've been working with CodeIgniter and I'm wondering if the way I'm setting up my controllers is not correct.
I'm trying to incorporate an admin section of my site using the method 2 found on Phil Sturgeon's blog.
If I also needed a controller to handle products and users in my front-end, could I name them products.php and users.php or would they cause conflicts?
Thank you for your help!
Upvotes: 1
Views: 176
Reputation: 146201
You can use same controller
name for both side (backend and frontend) within two different folders, i.e.
admin/users.php
front/users.php
But you can also use a prefix
for readability or to avoid confusions, like
admin/adm_users.php // read as admin users.php
front/frn_users.php // read as frontend users.php
Upvotes: 2