/** * Show the application dashboard to the user. * * @return Response */ public function show(ProductService $productService, $pid) { $product = $productService->getProductById($pid); $favorite = $productService->getFidByUPid($this->user->id, $pid); $product->favorite = $favorite; // dd($product); return view('product.single', ['product' => $product]); }