/** * Add URLs to dynamic pages of the site. * * @return void */ public function addDynamicRoutes() { $tricks = $this->tricks->findAllForSitemap(); foreach ($tricks as $trick) { $this->sitemap->add(URL::to("tricks/{$trick->slug}"), $trick->created_at, '0.9', 'weekly'); } $categories = $this->categories->findAll(); foreach ($categories as $category) { $this->sitemap->add(URL::to("categories/{$category->slug}"), $category->created_at, '0.9', 'daily'); } $tags = $this->tags->findAll(); foreach ($tags as $tag) { $this->sitemap->add(URL::to("tags/{$tag->slug}"), $tag->created_at, '0.9', 'daily'); } return $this->sitemap; }