@@ -165,19 +165,11 @@ You can easily define a route to handle requests to more than one URI. Just use
...
@@ -165,19 +165,11 @@ You can easily define a route to handle requests to more than one URI. Just use
<aname="routes-parameters"></a>
<aname="routes-parameters"></a>
### Route URI Parameters
### Route URI Parameters
Laravel makes passing URI parameters to your route functions a breeze. Check out this route:
Laravel makes passing URI parameters to your route functions a breeze using the **(:num)** and **(:any)** place-holders:
'PUT /user/(:num)' => function($id) {}
'PUT /user/(:num)' => function($id) {}
Notice the **(:num)** parameter in the URI? This tells Laravel to allow any numeric value in the second segment of the URI, as well as to pass the segment into the method.
'GET /user/(:any)/edit' => function($username) {}
We can also use the **(:any)** parameter to match the segment to any value: