Posted in Laravel, PHP

Route Model Binding : Multiple Route Key

When using Implicit Model Binding, you can use getRouteKeyName  to use alternative column such as slug instead of id to inject a model instance directly inside routes. Now, model can be bound only with slug column. When you think to use id, the binding fails.  Continue reading “Route Model Binding : Multiple Route Key”

Advertisements