Guest User

Untitled

a guest
Jun 18th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2.  
  3. /* ----- snip (omitting everything already in config/bootstrap/action.php) ----- */
  4.  
  5. /**
  6. * Filter to capture any admin-specific requests
  7. * This simply updates the internal action name for dispatching purposes. In order for this to
  8. * properly work across the board, you'll need to enable a persistent param for `admin` in your
  9. * routes configuration. Something to the effect of the following will do nicely:
  10. *
  11. * {{{
  12. * Router::connect(
  13. * '/admin/{:controller}/{:action}/{:args}',
  14. * array('admin' => true),
  15. * array('persist' => array('admin', 'controller'))
  16. * );
  17. * }}}
  18. */
  19.  
  20. Dispatcher::config(array(
  21. 'rules' => array('admin' => array('action' => 'admin_{:action}'))
  22. ));
Add Comment
Please, Sign In to add comment