예제 #1
0
 /**
  * Display the "Christmas Cards" landing page.
  *
  * @return \Illuminate\Contracts\View\View
  */
 public function christmasCardsAction()
 {
     return $this->webUi->view('customer.landing.christmas-cards', ['products' => $this->tagResource->where('name', '=', 'Christmas')->with(['products' => function ($query) {
         /* @var Product $query */
         $query->inStock();
         $query->with(['images', 'options', 'options.images', 'options.stockItems']);
     }])->first()->products]);
 }
예제 #2
0
 /**
  * @param int $tagId
  *
  * @throws \Exception
  *
  * @return bool
  */
 public function deleteById(int $tagId) : bool
 {
     return (bool) $this->tagResource->where('id', '=', $tagId)->first()->delete();
 }