Inheritance: extends Base
Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
     });
 }
Beispiel #3
0
 public function get_index()
 {
     $categories = Category::all();
     return \View::make('fluxbb::search.index')->with('categories', $categories);
 }
Beispiel #4
0
 protected function handleRequest(Request $request)
 {
     $group_id = User::current()->group_id;
     $categories = Category::allForGroup($group_id);
     $this->data['categories'] = $categories;
 }
Beispiel #5
0
 protected function handleRequest(Request $request)
 {
     $categories = Category::all();
     $this->data['categories'] = $categories;
 }