Welcome Guest, Not a member yet? Register   Sign In
CI 2: Routing for admin/dashboard and general user
#3

[eluser]mackski[/eluser]
Take a look at creating a base controller class, i use this approach for smallish admin / user sites.

MY_Controller.php
Code:
class MY_Controller extends Controller {
// shared stuff
}

class Admin_controller extends MY_Controller {
// admin specific stuff
}

class Public_controller extends MY_Controller {
// public user stuff
}

I find this easier to do authentication in the base controller.
Arrange your controllers how you want in your directories and just call them:
Code:
class Home_page extends Public_controller {

}

// or

class Admin_home extends Admin_controller {

}


Messages In This Thread
CI 2: Routing for admin/dashboard and general user - by El Forum - 03-28-2011, 10:42 AM
CI 2: Routing for admin/dashboard and general user - by El Forum - 03-28-2011, 11:03 PM
CI 2: Routing for admin/dashboard and general user - by El Forum - 03-29-2011, 04:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB