public function getIndex() { $tags = TalkTag::orderBy('name')->whereActive(1)->get(); $categories = TalkCategory::orderBy('name')->whereActive(1)->get(); $posts = TalkPost::orderBy('created_at', 'DESC')->whereParent_id(0)->take(10)->get(); $this->layout->content = View::make('talk::home.index')->with('tags', $tags)->with('posts', $posts)->with('categories', $categories); }
public function getIndex() { $categories = TalkCategory::orderBy('name')->whereActive(1)->get(); $this->layout->content = View::make('talk::categories.index', compact('categories')); }