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


PHP Category::getParentMenu方法代码示例

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


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

示例1: getLogin

 public function getLogin()
 {
     //MENU
     $mainMenu = Category::getParentMenu();
     $allMenu = Category::getAllMenu($mainMenu);
     //HOT PRODUCTS.
     $hotProduct = Product::hotProduct();
     //DISCOUNT PRODUCTS.
     $discountProduct = Product::discountProduct();
     return view('accounts.login', compact('allMenu', 'hotProduct', 'discountProduct'));
 }
开发者ID:hoangvu2015,项目名称:laravel_totnghiep,代码行数:11,代码来源:AuthController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     //MENU
     $mainMenu = Category::getParentMenu();
     $allMenu = Category::getAllMenu($mainMenu);
     //HOT PRODUCTS.
     $hotProduct = Product::hotProduct();
     //DISCOUNT PRODUCTS.
     $discountProduct = Product::discountProduct();
     //CONTACT
     $contact = Contact::find($id);
     return view('contacts.edit', compact('contact', 'allMenu', 'hotProduct', 'discountProduct'));
 }
开发者ID:hoangvu2015,项目名称:laravel_totnghiep,代码行数:19,代码来源:ContactController.php

示例3: show

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id = null)
 {
     //MENU
     $mainMenu = Category::getParentMenu();
     $allMenu = Category::getAllMenu($mainMenu);
     //HOT PRODUCTS.
     $hotProduct = Product::hotProduct();
     //DISCOUNT PRODUCTS.
     $discountProduct = Product::discountProduct();
     //SAN PHAM CUNG LOAI
     if ($id == null) {
         $category_product = Category::getCategory_Product();
         $nameCategory = "Tất Cả Sản Phẩm";
         return view('fornindex.detail_category', compact('nameCategory', 'category_product', 'allMenu', 'hotProduct', 'discountProduct'));
     } else {
         $array = Category::getCategory_Product($id);
         $category_product = $array['list'];
         $nameCategory = $array['name'];
         return view('fornindex.detail_category', compact('nameCategory', 'category_product', 'allMenu', 'hotProduct', 'discountProduct'));
     }
 }
开发者ID:hoangvu2015,项目名称:laravel_totnghiep,代码行数:27,代码来源:CategoryController.php

示例4: search

 /**
  * [search description]
  * @param  Request $request [description]
  * @return [type]           [description]
  */
 public function search(Request $request)
 {
     //MENU
     $mainMenu = Category::getParentMenu();
     $allMenu = Category::getAllMenu($mainMenu);
     //HOT PRODUCTS.
     $hotProduct = Product::hotProduct();
     //DISCOUNT PRODUCTS.
     $discountProduct = Product::discountProduct();
     //SEARCH PRODUCTS.
     $nameproduct = $request->get('search');
     $product = Product::searchNameProduct($nameproduct);
     return view('fornindex.user_search', compact('product', 'nameproduct', 'allMenu', 'hotProduct', 'discountProduct'));
 }
开发者ID:hoangvu2015,项目名称:laravel_totnghiep,代码行数:19,代码来源:PagesController.php

示例5: postCheckcart

 /**
  * Store a newly created resource in storage.
  * Check, before buy
  * @return Response
  */
 public function postCheckcart(Request $request)
 {
     if (\Auth::check()) {
         //MENU
         $mainMenu = Category::getParentMenu();
         $allMenu = Category::getAllMenu($mainMenu);
         //HOT PRODUCTS.
         $hotProduct = Product::hotProduct();
         //DISCOUNT PRODUCTS.
         $discountProduct = Product::discountProduct();
         //PAY
         $pay = Pay::find($request->get('pay'));
         if ($request->get('pay') == 2) {
             $account_number = true;
         } else {
             $account_number = false;
         }
         //SHIP
         $ship = Ship::find($request->get('ship'));
         if (\Session::has('giohang')) {
             \Session::put('pay', $pay->id);
             \Session::put('ship', $ship->id);
             return view('fornindex.shopping_cart_detail', compact('account_number', 'ship', 'pay', 'data', 'allMenu', 'hotProduct', 'discountProduct'));
         } else {
             echo 'vui long chon san pham!!!';
         }
     } else {
         return redirect('auth/login');
     }
 }
开发者ID:hoangvu2015,项目名称:laravel_totnghiep,代码行数:35,代码来源:CartController.php


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