Ejemplo n.º 1
0
 /**
  * Display the specified resource.
  *
  * @param string $sku
  *
  * @throws NotFoundHttpException
  *
  * @return \Illuminate\Http\Response
  */
 public function show(string $sku)
 {
     $product = $this->mustLoadProductBySku($sku);
     $tags = $this->catalogueRepository->loadAllTags();
     $colours = $this->catalogueRepository->loadAllColours();
     $categories = $this->catalogueRepository->loadAllCategories();
     $offers = Offer::all();
     return $this->buildView('show', compact('product', 'tags', 'colours', 'categories', 'offers'));
 }
Ejemplo n.º 2
0
 /**
  * @param Urlset $urlSet
  */
 private function addTags(Urlset $urlSet)
 {
     foreach ($this->catalogueRepository->loadAllTags() as $tag) {
         $url = new Url(htmlspecialchars($tag->url()));
         $url->setLastMod($tag->updated_at->toW3cString());
         $url->setChangeFreq('monthly');
         $url->setPriority(0.3);
         $urlSet->addUrl($url);
     }
 }