Route model binding provides a useful way to automatically method-inject a model's instance into your route closures, or controller actions. For example, if a user visits
/tasks/1, thanks to route model binding, we can make Laravel automatically fetch the
Task with an
1, and then inject that instance into your controller action.
Published on Jan 27th, 2017.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.