I guess you would pass the filter parameters in the get request.
Dec 27, 2016
8
Level 3
Filters paginate
Hi! How i can paginate filtered products?
$products = Products::where('kind_id', $kind->id)->where(function($query){
$brands = Input::get('brands');
if(isset($brands)){
foreach ($brands as $brand) {
$query->orWhere('producer_id', '=', $brand)->orderBy('product_order', 'desc')->paginate(12);
}
}
})->orderBy('product_order', 'desc')->paginate(12);
Products filter work is fine but paginate droped the filters paginate have a url
?page=2
Filters is gone
Please or to participate in this conversation.