public function get_index() { // TODO: Get list of forums and topics with new posts since last visit & get all topics that were marked as read // Fetch the categories and forums $categories = Category::allForGroup(User::current()->group_id); $view = \View::make('fluxbb::index'); $view['categories'] = $categories; return $view; }
public static function all() { return Cache::remember('fluxbb.categories', 7 * 24 * 60, function () { $all = array(); $categories = Category::orderBy('disp_position', 'ASC')->orderBy('id', 'ASC')->get(); foreach ($categories as $category) { $all[$category->id] = $category; } return $all; }); }
public function get_index() { $categories = Category::all(); return \View::make('fluxbb::search.index')->with('categories', $categories); }
protected function handleRequest(Request $request) { $group_id = User::current()->group_id; $categories = Category::allForGroup($group_id); $this->data['categories'] = $categories; }
protected function handleRequest(Request $request) { $categories = Category::all(); $this->data['categories'] = $categories; }