I'm working on an app in CodeIgniter, and I want to have admin pages for several of the objects in the application, and I'm wondering what would be the better way to put these into an MVC structure.
Idea 1: In each controller, have an admin function, and add all of the admin pages I would like into that function. example URL: domain.com/articles/admin
Idea 2 Make a new admin controller, which would have to reference many different models, and put all of the admin pages in there. example URL: domain.com/admin/articles
which way would be better?
I create a MY_Controller library for global methods and then extend that with a Frontend class and Backend class. I load my authentication library in MY_Controller. I’m sure someone has other ideas on how it should be done but this way all my new controllers can be added with ease, and easily configured to allow/deny access to controllers/actions.
Name (required)
Mail (will not be published) (required)
Website