Updated the routes.php config file comments and added the missing "translate_uri_dashes" config entry

This commit is contained in:
alextselegidis 2021-11-12 16:54:21 +01:00
parent cf579dddc2
commit 0b9f7ecea2

View file

@ -18,13 +18,13 @@
| |
| Please see the user guide for complete details: | Please see the user guide for complete details:
| |
| http://codeigniter.com/user_guide/general/routing.html | https://codeigniter.com/userguide3/general/routing.html
| |
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------
| RESERVED ROUTES | RESERVED ROUTES
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------
| |
| There area two reserved routes: | There are three reserved routes:
| |
| $route['default_controller'] = 'welcome'; | $route['default_controller'] = 'welcome';
| |
@ -34,9 +34,19 @@
| |
| $route['404_override'] = 'errors/page_missing'; | $route['404_override'] = 'errors/page_missing';
| |
| This route will tell the Router what URI segments to use if those provided | This route will tell the Router which controller/method to use if those
| in the URL cannot be matched to a valid route. | provided in the URL cannot be matched to a valid route.
| |
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes with
| underscores in the controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/ */
require_once __DIR__ . '/../helpers/routes_helper.php'; require_once __DIR__ . '/../helpers/routes_helper.php';
@ -45,6 +55,8 @@ $route['default_controller'] = 'appointments';
$route['404_override'] = ''; $route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
/* /*
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------
| REST API ROUTING | REST API ROUTING