How to use admin routing in cakephp

Cakephp

Posted on 19 Nov 15 by Vickey
  339



For useing admin routing go to your config/core.php file and add the below line 

Configure::write('Routing.prefixes', array('admin'));

now create your function by using prefix 'admin'

class UsersController extends AppController {

	public function admin_add() {

	}


	public function admin_view() {

	}

}

and now you can access these function with these url

localhost/cakeapp/admin/users/add

localhost/cakeapp/admin/users/view

 


If this post help you reduce time to develop, you can help me to maintain this website :)
www.000webhost.com