@@ -73,27 +73,27 @@ The following placeholders are available for you to use in your routes:
7373Examples
7474========
7575
76- Here are a few basic routing examples::
77-
78- $routes->add('journals', 'App\Blogs');
76+ Here are a few basic routing examples.
7977
8078A URL containing the word "journals" in the first segment will be remapped to the "App\B logs" class,
8179and the default method, which is usually ``index() ``::
8280
83- $routes->add('blog/joe ', 'Blogs::users/34 ');
81+ $routes->add('journals ', 'App\ Blogs');
8482
8583A URL containing the segments "blog/joe" will be remapped to the “\B logs” class and the “users” method.
8684The ID will be set to “34”::
8785
88- $routes->add('product/(:any) ', 'Catalog::productLookup ');
86+ $routes->add('blog/joe ', 'Blogs::users/34 ');
8987
9088A URL with “product” as the first segment, and anything in the second will be remapped to the “\C atalog” class
9189and the “productLookup” method::
9290
93- $routes->add('product/(:num )', 'Catalog::productLookupByID/$1' ;
91+ $routes->add('product/(:any )', 'Catalog::productLookup') ;
9492
9593A URL with “product” as the first segment, and a number in the second will be remapped to the “\C atalog” class
96- and the “productLookupByID” method passing in the match as a variable to the method.
94+ and the “productLookupByID” method passing in the match as a variable to the method::
95+
96+ $routes->add('product/(:num)', 'Catalog::productLookupByID/$1';
9797
9898.. important :: While the ``add()`` method is convenient, it is recommended to always use the HTTP-verb-based
9999 routes, described below, as it is more secure. It will also provide a slight performance increase, since
0 commit comments