/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { if ($album = $this->albums->findById($id)) { return view('frontend.store-details', compact('album')); } abort(404, 'Requested URL was not founded'); }
/** * Remove the specified resource from storage. * * @param int $id * @return array JSON */ public function removeFromCart($id) { if ($this->albums->findById($id)) { Cart::removeFromCart($id); return response()->json(['count' => Cart::getCount()]); } abort(404, 'Requested URL was not found'); }
/** * Remove the specified resource from storage. * * @param int $id * @return int */ public function destroy($id) { return $this->albums->delete($id); }