本文整理匯總了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'));
}