public function showCrafts() { $posts = Post::getPostsOrdered(); // For Laravel 4.2 use getFactory() instead of getEnvironment() method. $posts->getEnvironment()->setViewName('pagination::simple'); $tags = Tag::getTagsOrdered(); $crafts = Craft::getCraftsOrdered(); $this->layout->title = trans('messages.My Crafts'); $this->layout->main = View::make('home', ['recentPosts' => $posts, 'allTags' => $tags])->nest('content', 'crafts', compact('crafts')); }
public function listCrafts() { $crafts = Craft::getCraftsOrdered(); $this->layout->title = trans('messages.Craft listings'); $this->layout->main = View::make('users.dashboard')->nest('content', 'crafts.list', compact('crafts')); }