当前位置: 首页>>代码示例>>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;未经允许,请勿转载。