Skip to content

Commit 5db6948

Browse files
committed
docs: fix incorrect instructions
1 parent 4fd157b commit 5db6948

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

user_guide_src/source/installation/upgrade_routing.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ Upgrade Guide
2222
=============
2323

2424
1. If you use the Auto Routing in the same way as CI3, you need to enable :ref:`auto-routing`.
25-
2. You have to change the syntax of each routing line and append it in **app/Config/Routes.php**. For example:
25+
2. The placeholder ``(:any)`` in CI3 will be ``(:segment)`` in CI4.
26+
3. You have to change the syntax of each routing line and append it in **app/Config/Routes.php**. For example:
2627

2728
- ``$route['journals'] = 'blogs';`` to ``$routes->add('journals', 'Blogs::index');``. This would map to the ``index()`` method in the ``Blogs`` controller.
28-
- ``$route['product/(:any)'] = 'catalog/product_lookup';`` to ``$routes->add('product/(:any)', 'Catalog::productLookup');``
29+
- ``$route['product/(:any)'] = 'catalog/product_lookup';`` to ``$routes->add('product/(:segment)', 'Catalog::productLookup');``
2930
- ``$route['login/(.+)'] = 'auth/login/$1';`` to ``$routes->add('login/(.+)', 'Auth::login/$1');``
3031

3132
Code Example

user_guide_src/source/installation/upgrade_routing/001.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
$routes->add('posts/update', 'Posts::update');
2222
$routes->add('drivers/create', 'Drivers::create');
2323
$routes->add('drivers/update', 'Drivers::update');
24-
$routes->add('posts/(:any)', 'Posts::view/$1');
24+
$routes->add('posts/(:segment)', 'Posts::view/$1');

0 commit comments

Comments
 (0)