/** * Display a listing of the resource. * * @return Response */ public function index() { //$menus = menu::all() -> where('parent_id', '=', 0); $menus = menu::where('parent_id', '=', 0)->orderBy('order')->get(); return View::make('admin.menus.index', compact('menus')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $todos = menu::where('user_id', \Auth::id())->get(); return $todos; }