public function page($slug) { $data['page'] = Page::getBy($slug); $data['tags'] = Tag::all(); $data['section1'] = (object) ['title' => 'Main Section', 'subtitle' => 'List all post in a section', 'content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla iaculis mattis lorem, quis gravida nunc iaculis ac. Proin tristique tellus in est vulputate luctus fermentum ipsum molestie.', 'posts' => Page::getPostBy($slug)]; $data['section2'] = (object) ['title' => 'Section Two', 'subtitle' => 'Section Two Subtitle', 'content' => 'Section Two content']; $data['section3'] = (object) ['title' => 'Section Two', 'subtitle' => 'Section Two Subtitle', 'content' => 'Section Two content']; $data['sidebar'] = (object) ['latest_posts' => Post::getLatest(), 'popular_posts' => Post::getPopular()]; return view("home.page", $data); }