@splendidkeen Suggestion would be to use resourceful controller names and route–model binding. So your ProductController should have a show() method, and could have a Product instance injected:
class ProductController extends Controller
{
public function show(Product $product)
{
return view('product.show', compact('product'));
}
}
I’m not sure why you’re querying a product by ID, running get() and then first() in that single-result collection. If you need to query a product by ID then use Eloquent’s find() method (or even better findOrFail() which will throw an exception if a row with that ID does not exist):
$product = Product::findOrFail($id);
Other than that, I don’t really understand your problem.
only the first Product of every business will be shown
If your route contains the business ID and the product ID, then surely you only want a single product returned?