/** * @param Category $except * * @return CategoriesController */ protected function getCategoryOptions($except = null) { /** @var \Kalnoy\Nestedset\QueryBuilder $query */ $query = Menu::select('id', 'fun_name')->withDepth(); if ($except) { $query->whereNotDescendantOf($except)->where('id', '<>', $except->id); } return $this->makeOptions($query->get()); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // return Menu::select('id', 'nombre', 'path')->orderBy('id', 'asc')->get(); }