本文整理汇总了PHP中app\Category::getAllMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP Category::getAllMenu方法的具体用法?PHP Category::getAllMenu怎么用?PHP Category::getAllMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Category
的用法示例。
在下文中一共展示了Category::getAllMenu方法的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'));
}
示例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'));
}
示例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'));
}
}
示例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'));
}
示例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');
}
}