/**
  * 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');
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     if (!($album = $this->albums->findById($id))) {
         throw new NotFoundHttpException('url not found');
     }
     $artists = $this->artists->all();
     return view('backend.albums.edit', compact('album', 'artists'));
 }