Try something like this:
$router->bind('products', function($id) use ($router) {
$extra = $router->getCurrentRequest()->input('extra');
$product = Product::where('id',$id)->someScope($extra)->first();
return $product;
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community