Skip to content

Commit

Permalink
Merge pull request #2327 from jim-parry/fix/route-docs
Browse files Browse the repository at this point in the history
Correct the routing UG page
  • Loading branch information
lonnieezell authored Oct 11, 2019
2 parents 34a187c + cf65d1e commit cc34771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions user_guide_src/source/incoming/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ is allowed, as are back-references.
.. important:: Note: If you use back-references you must use the dollar syntax rather than the double backslash syntax.
A typical RegEx route might look something like this::

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

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

This comment has been minimized.

Copy link
@fefo-p

fefo-p Oct 12, 2019

of the Products controller class, with the original first and second segment passed as arguments to it.

This comment has been minimized.

Copy link
@jim-parry

jim-parry Oct 12, 2019

Contributor

Agreed. I tried to keep it as close to the original as possibe, is all.

This comment has been minimized.

Copy link
@MGatner

MGatner Oct 12, 2019

Member

I think @fefo-p was pointing out the typo “passwed”


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

1 comment on commit cc34771

@jim-parry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha - I see that now. My bad!

Please sign in to comment.