public function getBlogs($id)
 {
     $tag = $this->tagRepository->findById($id);
     $tags = $this->tagRepository->getBlogTags();
     $posts = $tag->blogs()->paginate(5);
     $this->title = $tag->name;
     $this->render('site.tags.blogs', compact('posts', 'tag', 'tags'));
 }
 /**
  * Returns all the blog posts.
  *
  * @return View
  */
 public function index()
 {
     // Get all the blog posts
     $this->title = trans('word.blog');
     $posts = $this->blogRepository->getAllPaginated(['category', 'photos', 'author']);
     $categories = $this->categoryRepository->getPostCategories()->get();
     $tags = $this->tagRepository->getBlogTags();
     // Show the page
     $this->render('site.blog.index', compact('posts', 'categories', 'tags'));
 }