当前位置: 首页>>代码示例>>PHP>>正文


PHP Menu::all方法代码示例

本文整理汇总了PHP中app\Menu::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Menu::all方法的具体用法?PHP Menu::all怎么用?PHP Menu::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Menu的用法示例。


在下文中一共展示了Menu::all方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $permisos = \App\Menu::all()->lists('nombre', 'id');
     $nivel_usuario = \App\UserLevel::all()->lists('UserLevelName', 'UserLevelID');
     /*array_unshift($nivel_usuario,'Seleccione un nivel de usuario');*/
     array_unshift($permisos, 'Seleccione una opcion del menu');
     return view('permisos.crear')->with(['permisos' => $permisos, 'userlevel' => $nivel_usuario]);
 }
开发者ID:hramose,项目名称:Sistema-Control-de-Almacen,代码行数:13,代码来源:PermisosController.php

示例2: get_menu

 public function get_menu()
 {
     $rekap = array();
     $data = \App\Menu::all();
     foreach ($data as $key) {
         $rekap[] = array('id' => $key->id, 'parentid' => $key->id_induk, 'text' => $key->nama, 'value' => $key->id);
     }
     echo json_encode($rekap);
 }
开发者ID:ariefsetya,项目名称:kopsimpin,代码行数:9,代码来源:AjaxController.php

示例3: search

 public function search(UserSearchIndexRequest $query)
 {
     $menus = Menu::all();
     $querys = $query->input('query');
     $users = User::where('username', 'LIKE', '%' . $querys . '%')->orWhere('email', 'LIKE', '%' . $querys . '%')->orWhere('name', 'LIKE', '%' . $querys . '%')->paginate(10);
     if ($users == NULL) {
         $users = 'Không Tìm Thấy';
     }
     return view('user.index')->with(array('users' => $users, 'menus' => $menus));
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:10,代码来源:MenuController.php

示例4: search

 public function search(canboSearchIndexRequest $query)
 {
     $menus = Menu::all();
     $querys = $query->input('query');
     $canbos = Canbo::where('name', 'LIKE', '%' . $querys . '%')->orWhere('fullname', 'LIKE', '%' . $querys . '%')->orderBy('name')->paginate(10);
     if ($canbos == NULL) {
         $canbos = 'Không Tìm Thấy';
     }
     return view('canbo.index')->with(array('canbos' => $canbos, 'menus' => $this->menus));
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:10,代码来源:CanboController.php

示例5: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (Auth::check() && $this->rolechucnangs && $this->rolechucnangs->Danhsach == 1) {
         $menus = Menu::all();
         $roles = Role::all();
         return view('role.index')->with(array('menus' => $this->menus, 'roles' => $roles, 'rolechucnangs' => $this->rolechucnangs));
     } else {
         return \Redirect::to('/')->with('message-error', 'Không có quyền truy cập');
     }
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:15,代码来源:RoleController.php

示例6: search

 public function search(DanhmucchuyendeSearchIndexRequest $query)
 {
     $menus = Menu::all();
     $querys = $query->input('query');
     $danhmucchuyendes = Danhmucchuyende::where('name', 'LIKE', '%' . $querys . '%')->orderBy('name')->paginate(10);
     if ($danhmucchuyendes == NULL) {
         $danhmucchuyendes = 'Không Tìm Thấy';
     }
     return view('danhmucchuyende.index')->with(array('danhmucchuyendes' => $danhmucchuyendes, 'menus' => $this->menus));
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:10,代码来源:DanhmucchuyendeController.php

示例7: search

 public function search(CongviecSearchIndexRequest $query)
 {
     $menus = Menu::all();
     $querys = $query->input('query');
     $congviecs = \DB::table('congviecs')->join('tinhtrangcongviecs', 'tinhtrangcongviecs.id', '=', 'congviecs.tinhtrangcongviec_id')->join('danhmucnguonphatsinhs', 'danhmucnguonphatsinhs.id', '=', 'congviecs.nguonphatsinh_id')->select('congviecs.id', 'nguonphatsinh_id', 'socongvanden', 'ngayluu', 'noidungcongviec', 'canhanthuchien', 'ngaybatdau', 'thoigianthuchien', 'ngayketthuc', 'tinhtrangcongviec_id', 'mucdohoanthanh', 'chidaodanhgia', 'file_id', 'tinhtrangcongviecs.name as tinhtrangcongviec', 'danhmucnguonphatsinhs.name as nguonphatsinh')->where('socongvanden', 'LIKE', '%' . $querys . '%')->orWhere('noidungcongviec', 'LIKE', '%' . $querys . '%')->orWhere('canhanthuchien', 'LIKE', '%' . $querys . '%')->orWhere('mucdohoanthanh', 'LIKE', '%' . $querys . '%')->orWhere('lydokhonghoanthanh', 'LIKE', '%' . $querys . '%')->orWhere('chidaodanhgia', 'LIKE', '%' . $querys . '%')->paginate(10);
     if ($congviecs == NULL) {
         $congviecs = 'Không Tìm Thấy';
     }
     return view('congviec.index')->with(array('congviecs' => $congviecs, 'menus' => $this->menus));
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:10,代码来源:CongviecController.php

示例8: getUserMenu

 public function getUserMenu()
 {
     $user = Auth::user();
     //获取当前登录用户
     $all_menus = Menu::all();
     $user_menus = [];
     foreach ($all_menus as $all_menu) {
         if ($user->can($all_menu->slug)) {
             $user_menus[$all_menu->id] = $all_menu->toArray();
         }
     }
     return $this->dealMenu($user_menus, 1);
 }
开发者ID:xezw211,项目名称:hsky-laravel-backend,代码行数:13,代码来源:MenuService.php

示例9: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(General $general, Request $request)
 {
     $theme = $general->theme();
     $menu = Menu::find($request['menu']);
     $menus = null;
     if (!$menu) {
         $menus = Menu::all()->lists('name_en', 'id');
     }
     $content = new Content();
     $types = ['0' => '---'];
     foreach (ContentType::all()->lists('name', 'id') as $key => $value) {
         array_push($types, $value);
     }
     $theme['title'] = 'Create Content';
     $theme['description'] = 'description for content creation';
     $button_text = 'Create Content';
     return view('admin.content.create', compact('theme', 'menu', 'menus', 'content', 'types', 'button_text'));
 }
开发者ID:ronal2do,项目名称:Laravel-CMS,代码行数:23,代码来源:ContentController.php

示例10: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     return view("wd.index")->withData(['menu' => Menu::all(), 'products' => $this->doSearchByCategory(WDConfig::PRODUCT_CATEGORY_JIEMIAN), 'wdInfo' => WdInfo::find(1)]);
 }
开发者ID:supermason,项目名称:homestreward,代码行数:10,代码来源:WDController.php

示例11: menuMain

 public function menuMain()
 {
     $menus = Menu::all();
     return view('Website.menu')->with('menus', $menus);
 }
开发者ID:nilesh93,项目名称:HOTEL_RESERVATION,代码行数:5,代码来源:MenuControllerWeb.php

示例12: viewsend

 public function viewsend()
 {
     $menus = Menu::all();
     return view('emails.viewsend')->with(array('menus' => $this->menus, 'rolechucnangs' => $this->rolechucnangs));
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:5,代码来源:MymailController.php

示例13: getAll

 /**
  * Get all
  * @return Collection
  */
 public function getAll()
 {
     $menus = Menu::all();
     return $menus;
 }
开发者ID:rstuemer,项目名称:homeauto,代码行数:9,代码来源:MenuRepository.php

示例14: search

 public function search(CongvandiSearchIndexRequest $query)
 {
     $menus = Menu::all();
     $querys = $query->input('query');
     $congvandis = Congvandi::where('socongvandiso', 'LIKE', '%' . $querys . '%')->orWhere('socongvandichu', 'LIKE', '%' . $querys . '%')->orWhere('noiluu', 'LIKE', '%' . $querys . '%')->orWhere('trichyeucongvandi', 'LIKE', '%' . $querys . '%')->paginate(10);
     if ($congvandis == NULL) {
         $congvandis = 'Không Tìm Thấy';
     }
     return view('congvandi.index')->with(array('congvandis' => $congvandis, 'menus' => $this->menus));
 }
开发者ID:thaigialai1987,项目名称:qlcv,代码行数:10,代码来源:CongvandiController.php

示例15: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index(Menu $menu)
 {
     $menus = $menu->all();
     return view('admin.menus.menus', compact('menus'));
 }
开发者ID:jbs321,项目名称:profiler,代码行数:10,代码来源:MenuController.php


注:本文中的app\Menu::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。