當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Product::paginate方法代碼示例

本文整理匯總了PHP中app\models\Product::paginate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Product::paginate方法的具體用法?PHP Product::paginate怎麽用?PHP Product::paginate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\models\Product的用法示例。


在下文中一共展示了Product::paginate方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index()
 {
     $cart = app('cart');
     $wishlist = app('wishlist');
     $products = Product::paginate(20);
     return View::make('cart.products', compact('cart', 'wishlist', 'products'));
 }
開發者ID:Denniskevin,項目名稱:demo-cart,代碼行數:7,代碼來源:HomeController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index($page = 5)
 {
     $menu = new Product();
     if ($page == 'all') {
         $page = Product::get()->count();
     }
     $products = Product::paginate($page);
     return view('admin.products.index', compact('products'));
 }
開發者ID:pavhov93,項目名稱:blog2,代碼行數:14,代碼來源:ProductsController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $data = ['page_title' => 'Products', 'navi_group' => 'products', 'products' => Product::paginate(5)];
     return view('products.index', $data);
 }
開發者ID:w1n78,項目名稱:storedemo,代碼行數:10,代碼來源:ProductController.php

示例4: index

 public function index()
 {
     $products = Product::paginate(15);
     return view('admin\\products.index', ['products' => $products, 'page_title' => 'Products']);
 }
開發者ID:SaadEddinHassania,項目名稱:hassania,代碼行數:5,代碼來源:ProductsController.php

示例5: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $products = Product::paginate(10);
     return view('backoffice.product.index', ['products' => $products]);
 }
開發者ID:eduardor2k,項目名稱:shop-php-assesment,代碼行數:10,代碼來源:ProductController.php

示例6:

@extends('admin.layout')

@section('content')

    <?php 
$model_items = \App\Models\Product::paginate(30);
?>

    <h3>Товары</h3>

    <div class="row">
        <div class="col-lg-1">
            <div class="btn-toolbar" role="toolbar" style="margin-bottom: 10px">
                <a class="btn btn-info" href="/admin/product/create">Добавить</a>
            </div>
        </div>
        <div class="col-lg-6">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="маска наименования товара" id="input-search-like">
          <span class="input-group-btn">
            <button class="btn btn-default" type="button" onclick="searchProductByLike('#input-search-like', '#products-target-container')">Go!</button>
          </span>
            </div><!-- /input-group -->
        </div>
    </div>

    <div id="products-target-container">
        @include('admin.product.table')
    </div>

@endsection
開發者ID:serovvitaly,項目名稱:kotik,代碼行數:31,代碼來源:index.blade.php

示例7: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $products = Product::with('brands', 'size', 'category')->get();
     $products = Product::paginate(10);
     return view('product.index', compact('products'));
 }
開發者ID:raylight75,項目名稱:cms,代碼行數:11,代碼來源:ArticlesController.php

示例8: index

 /**
  * Display a listing of products.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $products = Product::paginate();
     return view('home', compact('products'));
 }
開發者ID:RsanabriaZ,項目名稱:web-catalog,代碼行數:10,代碼來源:HomeController.php

示例9: getIndex

 public function getIndex()
 {
     return view('admin.products.index', ['products' => Product::paginate(15), 'categories' => Category::tree()]);
 }
開發者ID:venomir,項目名稱:tc,代碼行數:4,代碼來源:ProductController.php

示例10: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $products = Product::paginate(15);
     return view('frontoffice.products.index', compact('products'));
 }
開發者ID:AntonBeletsky,項目名稱:laravel_minishop,代碼行數:10,代碼來源:ProductsController.php

示例11: index

 public function index()
 {
     $products = Product::paginate(Config::get('common.pagination'));
     $types = ProductType::where('status', 1)->lists('title', 'id');
     return view('productStockInitializations.index', compact('products', 'types'));
 }
開發者ID:saj696,項目名稱:pipe,代碼行數:6,代碼來源:ProductStockInitializationsController.php

示例12: index

 public function index(Product $product, Request $request)
 {
     $products = $product->paginate($this->itemsCount);
     return view('admin.products.index')->with('products', $products);
 }
開發者ID:metisast,項目名稱:tiyn.local,代碼行數:5,代碼來源:ProductsController.php

示例13: shop

 public function shop(Request $request)
 {
     $products = Product::paginate(12);
     return response()->view('shop', array('products' => $products));
 }
開發者ID:hogggy,項目名稱:infinite-wonder,代碼行數:5,代碼來源:PageController.php

示例14: index

 /**
  * Display a listing of the Product model instances.
  *
  * @return Response
  */
 public function index()
 {
     // Select all products with pagination, paginate 40 products per page
     $products = Product::paginate(self::PAGINATION_SIZE);
     return view('admin.products.index')->with(compact('products'));
 }
開發者ID:catchup-forks,項目名稱:gameshop,代碼行數:11,代碼來源:ProductController.php


注:本文中的app\models\Product::paginate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。