Published On Jan. 27th 2017

Laravel 5.4 From Scratch: Route Model Binding

Episode 9 Run Time 2:43

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 id of 1, and then inject that instance into your controller action.