Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 932435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:40:05+00:00 2026-05-15T20:40:05+00:00

I want to build a project using codeigniter, the project consist of 2 levels,

  • 0

I want to build a project using codeigniter, the project consist of 2 levels, USER level and ADMIN level

I’m now building the ADMIN level, is it the best practice to make all my admin functions in 1 controller? like add/modify/delete users and add/modify/delete admins etc….

or make many controllers everyone has it’s job like one for add/modify/delete users and another controller for add/modify/delete admins .. and so on?

I think the second choice is better but then I will have another problem, which is separating my user level controllers from the admin level controllers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:40:05+00:00Added an answer on May 15, 2026 at 8:40 pm

    Personally it all comes down to preference. I prefer the method of creating an admin folder in my controllers folder so accessing my controllers for the admin area happens like so:

    http://www.exampleapp.com/admin/clients
    admin is the folder name in your controllers folder
    clients is the name of the controller within the admin folder
    

    The above URL structure has it’s advantages and disadvantages (I prefer it to keep my code clean and less cluttered).

    I tend to also make one model per table in the database. So a model called users would deal with all aspects of the users table in my database. A products model would deal with all aspects of the products database table.

    You’re still adhering to the DRY (don’t repeat yourself) method because you simply include the model files you need from within your admin controllers depending on what section of the admin you’re administering.

    For your users section you could create a folder called users within your controllers folder and use the same above mentioned method.

    Phil Sturgeon (a.k.a God of Codeigniter) summed this up in his blog post, but goes into a little more detail, give it a read: http://philsturgeon.co.uk/news/2009/07/Create-an-Admin-panel-with-CodeIgniter

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project which I can build and deploy correctly using Ant I
I'm developing an EMR Application as my project. there Im using WCF to transfer
I'm working on a project where I need to make a Flex application that
I am trying to automate our build/deployment process. So far I am using: a
I imported a Maven project and it used Java 1.5 even though I have
I'm trying to use application settings with a C#.NET project I am working on.
i have following code #include <iostream> #include <string> using namespace std; string generate(){ for
I am creating a simple web site to get more familiar with MVC 2.0.
I have VS 2008 Team Suite, and use TFS. I have references in 2
My maven reports are working great, all except Checkstyle and test xref. My test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.