本文整理汇总了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'));
}
示例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'));
}
示例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);
}
示例4: index
public function index()
{
$products = Product::paginate(15);
return view('admin\\products.index', ['products' => $products, 'page_title' => 'Products']);
}
示例5: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$products = Product::paginate(10);
return view('backoffice.product.index', ['products' => $products]);
}
示例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
示例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'));
}
示例8: index
/**
* Display a listing of products.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$products = Product::paginate();
return view('home', compact('products'));
}
示例9: getIndex
public function getIndex()
{
return view('admin.products.index', ['products' => Product::paginate(15), 'categories' => Category::tree()]);
}
示例10: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$products = Product::paginate(15);
return view('frontoffice.products.index', compact('products'));
}
示例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'));
}
示例12: index
public function index(Product $product, Request $request)
{
$products = $product->paginate($this->itemsCount);
return view('admin.products.index')->with('products', $products);
}
示例13: shop
public function shop(Request $request)
{
$products = Product::paginate(12);
return response()->view('shop', array('products' => $products));
}
示例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'));
}