Route parameters are captured with curly braces, e.g. Route::get('/users/{id}', ...). Laravel's route model binding automatically resolves an Eloquent model instance from the route parameter, throwing a 404 if not found. This eliminates manual lookups inside controllers.
← Laravel theorytheory 0/50 · 0%
Routing · easy
4. Route Parameters & Model Binding
Passing dynamic segments to routes.
Check your understanding
1. What does implicit route model binding do?
2. Syntax for an optional route parameter?