Пример #1
0
 /**
  * @throws \BadMethodCallException
  *
  * @return Collection
  */
 public function frontProducts() : Collection
 {
     $key = $this->key('product.front');
     if ($this->cacheHas($key)) {
         return $this->cacheGet($key);
     }
     $products = $this->catalogueRepository->loadFrontProducts();
     $this->cachePut($key, $products, Carbon::tomorrow());
     return $products;
 }