concord: Route::model binding causing other package route broken
I used vanilo/product package which bound the router parameter “{product}” to Vanilo\Product\Models\Product, and I have another package which have route like this:
Route::get("products/{product}", function(\Example\Models\Product $product) {
});
it will always return empty $product as its class is not matched with the bound model class.
Is this explicit binding necessary? or implicit binding will be sufficient?
Thanks in advance.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (8 by maintainers)
Update Concord to v1.7 and use the
register_route_models
inconfig/concord.php
to disable route model automatic registration.See: https://konekt.dev/concord/1.7/routes#route-model-bindings
That’s exactly what I was thinking about to add. Added it to my schedule for tomorrow. It’s gonna be in 1.7 - to be released in the next days.
Thanks for taking the effort and guiding me through this issue!