Thursday, May 7, 2015

Administration,Admin,Superadmin with Cake 3 - Prefix

In cakephp 3.X change routing concept, Configure::write('Routing.prefixes', array('admin')); If u want to use it, Please make a admin folder inside ur controller folder and write a same name controller name in this folder. If u want to admin_index() function like 2.X then u write only index () function in admin folder controller .
Please u note one things, in ur router.php u add this code
Router::prefix('admin', function ($routes) { 
  //My route   
  $routes->fallbacks('InflectedRoute');
}); 

No comments:

Post a Comment