/** * Display a listing of the resource. * Hiển thị danh sách các category trên thanh navbar * @return Response */ public function cat_dropdown() { return Response::json(Category::get()); }
public function renderChildren($id) { $this->template->selectedCategory = $this->category->get($id); $this->template->category = $this->category->where('parent', $id); }