File tree Expand file tree Collapse file tree
user_guide_src/source/tutorial Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66$ routes ->get ('news/(:segment) ' , 'News::view/$1 ' );
77$ routes ->get ('news ' , 'News::index ' );
88$ routes ->get ('pages ' , 'Pages::index ' );
9- $ routes ->get ('(:any ) ' , 'Pages::view/$1 ' );
9+ $ routes ->get ('(:segment ) ' , 'Pages::view/$1 ' );
1010
1111// ...
Original file line number Diff line number Diff line change 55$ routes ->get ('news/(:segment) ' , 'News::view/$1 ' );
66$ routes ->get ('news ' , 'News::index ' );
77$ routes ->get ('pages ' , 'Pages::index ' );
8- $ routes ->get ('(:any ) ' , 'Pages::view/$1 ' );
8+ $ routes ->get ('(:segment ) ' , 'Pages::view/$1 ' );
99
1010// ...
Original file line number Diff line number Diff line change @@ -148,11 +148,11 @@ arguments.
148148More information about routing can be found in the URI Routing
149149:doc: `documentation </incoming/routing >`.
150150
151- Here, the second rule in the ``$routes `` object matches GET request
152- to the URI path ``/pages `` maps the ``index() `` method of the ``Pages `` class.
151+ Here, the second rule in the ``$routes `` object matches a GET request
152+ to the URI path ``/pages ``, and it maps to the ``index() `` method of the ``Pages `` class.
153153
154- The third rule in the ``$routes `` object matches GET request to ** any ** URI path
155- using the wildcard string ``(:any ) ``, and passes the parameter to the
154+ The third rule in the ``$routes `` object matches a GET request to a URI segment
155+ using the placeholder ``(:segment ) ``, and passes the parameter to the
156156``view() `` method of the ``Pages `` class.
157157
158158Running the App
Original file line number Diff line number Diff line change 11<?php
22
33$ routes ->get ('pages ' , 'Pages::index ' );
4- $ routes ->get ('(:any ) ' , 'Pages::view/$1 ' );
4+ $ routes ->get ('(:segment ) ' , 'Pages::view/$1 ' );
You can’t perform that action at this time.
0 commit comments