Pagination in laravel is showing blank page in pages other than first.
below is controller
$products=DB::table('products')->join('mobile_devices', 'products.id', '=', 'mobile_devices.product_id')->where('mobile_devices.brand', '=',$request->brand)
->where('mobile_devices.ram', '=', $request->ram)
->where('mobile_devices.storage', '=',$request->storage )
->select('products.*')->paginate(15);
below is blade
<div class="product-filter product-filter-bottom filters-panel">
<div class="row">
<div class="col-sm-6 text-left"></div>
<div class="col-sm-6 text-right">{{$products->links()}}</div>
</div>
</div>
working fine in eloquent result but in query result the problem is occuring. The first page is shown but in other pages just blank page appears