public function findBlogsByURL($url) { return Blog::where('url', $url)->where('is_published', 1)->first(); }
/** * Display the specified Blog. * * @param int $id * * @return Response */ public function show($url) { $blog = $this->blogRepository->findBlogsByURL($url); if (empty($blog)) { abort(404); } return view('quarx-frontend::blog.' . $blog->template)->with('blog', $blog); }