routes.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Routes configuration
  4. *
  5. * In this file, you set up routes to your controllers and their actions.
  6. * Routes are very important mechanism that allows you to freely connect
  7. * different urls to chosen controllers and their actions (functions).
  8. *
  9. * PHP 5
  10. *
  11. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  12. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  13. *
  14. * Licensed under The MIT License
  15. * Redistributions of files must retain the above copyright notice.
  16. *
  17. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  18. * @link http://cakephp.org CakePHP(tm) Project
  19. * @package app.Config
  20. * @since CakePHP(tm) v 0.2.9
  21. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  22. */
  23. // Needed to enable JsonView
  24. // http://book.cakephp.org/2.0/en/views/json-and-xml-views.html#enabling-data-views-in-your-application
  25. Router::parseExtensions('json');
  26. Router::connect('/fortunes', ['controller' => 'Fortunes', 'action' => 'index']);
  27. Router::connect('/db', ['controller' => 'World', 'action' => 'query']);
  28. Router::connect('/queries', ['controller' => 'World', 'action' => 'index']);
  29. Router::connect('/updates', ['controller' => 'World', 'action' => 'updates']);
  30. /**
  31. * Load all plugin routes. See the CakePlugin documentation on
  32. * how to customize the loading of plugin routes.
  33. */
  34. CakePlugin::routes();
  35. /**
  36. * Load the CakePHP default routes. Only remove this if you do not want to use
  37. * the built-in default routes.
  38. */
  39. require CAKE . 'Config' . DS . 'routes.php';