@@ -161,3 +161,30 @@ You can easily define a route to handle requests to more than one URI. Just use
...
@@ -161,3 +161,30 @@ You can easily define a route to handle requests to more than one URI. Just use
> **Note:** The routes.php file replaces the "controllers" found in most frameworks. Have a fat model and keep this file light and clean. Thank us later.
> **Note:** The routes.php file replaces the "controllers" found in most frameworks. Have a fat model and keep this file light and clean. Thank us later.
[Back To Top](#top)
[Back To Top](#top)
<aname="routes-parameters"></a>
### Route URI Parameters
Laravel makes passing URI parameters to your route functions a breeze. Check out this route:
'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.
We can also use the **(:any)** parameter to match the segment to any value: