コード例 #1
0
ファイル: menusController.php プロジェクト: hshifaz/website
 /**
  * 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'));
 }
コード例 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $todos = menu::where('user_id', \Auth::id())->get();
     return $todos;
 }