public function index(Request $request) { $tag = $request->get('tag'); $data = $this->dispatch(new BlogIndexData($tag)); $layout = $tag ? Tag::layout($tag) : 'blog.layouts.index'; return view($layout, $data); }
public function index(Request $request) { $tag = $request->get('tag'); $data = $this->dispatch(new BlogIndexData($tag)); // Click BLOG $layout = $tag ? Tag::layout($tag) : 'pages.layouts.blog'; //SCROLL BLOG - Remove Pager Styles // $layout = $tag ? Tag::layout($tag) : 'sandbox.scroll-blog'; return view($layout, $data); }
public function index(request $request) { $tag = $request->get('tag'); $data = $this->dispatch(new BlogIndexData($tag)); $layout = $tag ? Tag::layout($tag) : 'blog.layouts.index'; return view($layout, $data); // $posts = Post::where('published_at', '<=', Carbon::now()) // ->orderBy('published_at', 'desc') // ->paginate(config('blog.posts_per_page')); // return view('blog.index', compact('posts')); }
public function index(Request $request) { /* $posts = Post::where("published_at", "<=", Carbon::now()) ->orderBy("published_at", "desc") ->paginate(config("blog.posts_per_page")); return view("blog.index", compact("posts")); */ $tag = $request->get("tag"); $data = $this->dispatch(new BlogIndexData($tag)); $layout = $tag ? Tag::layout($tag) : "blog.layouts.index"; return view($layout, $data); }
public function showTag($tag, Request $request) { $data = $this->dispatch(new HomeIndexData($tag)); $layout = $tag ? Tag::layout($tag) : 'home.layouts.index'; return view($layout, $data); }