Prefix routing in CakePHP 3? -
routing in cakephp 2.x:
- in core.php :
configure::write('routing.prefixes', array('admin', 'user'));
in
userscontroller
create method admin , other user. example:public function admin_edit()
public function user_edit()
in
views
create directory admin , other user. example:views/users/admin/edit.ctp
views/users/user/edit.ctp
finally, routes:
for admin :
www.sitio.com/users/**admin**/edit
user :www.sitio.com/users/**user**/edit
how implement same in cakephp 3? read documentation, don't understand: http://book.cakephp.org/3.0/en/development/routing.html#prefix-routing
Comments
Post a Comment