cakephp-plugin controller_prefix
`Controller name prefix' custom route plugin for CakePHP
k1low/controller_prefix
`Controller name prefix' custom route plugin for CakePHP
- Friday, October 24, 2014
- by k1LoW
- Repository
- 2 Watchers
- 11 Stars
- 4,176 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 6 Forks
- 0 Open issues
- 2 Versions
- 1 % Grown
Controller prefix plugin for CakePHP
`Controller name prefix' custom route plugin for CakePHP, (*1)
, (*2)
Background
This custom route class prove controller name prefix route., (*3)
ex. /admin/users/edit => AdminUsersController::edit(), (*4)
Installation
- Download this: http://github.com/k1LoW/controller_prefix/zipball/master
- Unzip that download.
- Copy the resulting folder to app/plugins
- Rename the folder you just copied to controller_prefix
Usage
Add the following code in routes.php, (*5)
App::import('Lib', 'ControllerPrefix.ControllerPrefixRoute');
Router::connect('/admin/:controller/:action/*',
array('controllerPrefix' => 'admin'), array('routeClass' => 'ControllerPrefixRoute'));
License
under MIT Lisence, (*6)