Welcome Guest, Not a member yet? Register   Sign In
Admin module

[eluser]Mauricio de Abreu Antunes[/eluser]
Nunca usei, mas tem vários sites falando sobre e bem documentados.

I've never used but therer are several sites talking about it and with large documentation.

Ok, I'll try found it later. I'm studying too Yii framework.

Codeigniter does not include any controllers, other than the simple "Hello world" welcome.php controller. An admin controller is probably used on any application, but how many would every been the same. My guess is zero.

You can make an admin controller as easy as:
class Admin extends CI_Controlelr{

  public function __construct()

    if ( ! $this->auth_library->is_admin() )

$route['admin/(:any)/(:any)'] = '$1_admin/$2'; // admin/blog/index => blog_admin/index
$route['admin/(:any)']        = 'admin/$1';    // admin/index      => admin/index
$route['admin']               = 'admin/index'; // admin            => admin/index

I like to create an admin controller for each module/controller, so you don't end up with some large Admin controller. Again, this allows you to create a frontend & backend controllers you can move to different projects. I use the admin controller for only the "dashboard" part of the backend.

Theme © iAndrew 2016 - Forum software by © MyBB