Skip to content

Commit cc34771

Browse files
authored
Merge pull request #2327 from jim-parry/fix/route-docs
Correct the routing UG page
2 parents 34a187c + cf65d1e commit cc34771

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

user_guide_src/source/incoming/routing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ is allowed, as are back-references.
122122
.. important:: Note: If you use back-references you must use the dollar syntax rather than the double backslash syntax.
123123
A typical RegEx route might look something like this::
124124

125-
$routes->add('products/([a-z]+)/(\d+)', '$1::id_$2');
125+
$routes->add('products/([a-z]+)/(\d+)', 'Products::show/$1/id_$2');
126126

127-
In the above example, a URI similar to products/shirts/123 would instead call the \Shirts” controller class
128-
and the “id_123” method.
127+
In the above example, a URI similar to products/shirts/123 would instead call the ``show`` method
128+
of the ``Products`` controller class, with the original first and second segment passwed as arguments to it.
129129

130130
With regular expressions, you can also catch a segment containing a forward slash (‘/’), which would usually
131131
represent the delimiter between multiple segments.

0 commit comments

Comments
 (0)