Welcome Guest, Not a member yet? Register   Sign In
ci-3 how to create admin without duplicating core files
#10

I found the following controller hierarchy useful:
The base controller (called MY_Controller and extends CI_Controller) does not check for login: any controller that extends it is open to the public.
The user_controller extends the base controller and checks that the user is logged_in. Any controller that extends it is only available to logged in users.
The admin_controller extends the user_controller and checks for the admin role. Any controller that extends it is available only to admin users.
All 3 controllers reside inside the core/MY_Controller.php file
Reply


Messages In This Thread
RE: ci-3 how to create admin without duplicating core files - by Shawn - 07-10-2016, 08:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB