skip to Main Content

Laravel – BadMethodCallException Method IlluminateDatabaseEloquentCollection::appends does not exist

this is what i use {{ $products->appends(request()->except('page'))->links() }} and this is my controller if ($request->get('sort') == 'sort-price_asc') { $products = Product::whereIn('id', $product_ids)->published()->paginate(12); $products = $products->sortBy(function ($prod) { return ceil(($prod->packs->count() > 0 ? $prod->packs->sortBy('pivot.add_time')->first()->volume : 1) * $prod->price); }); } But…

VIEW QUESTION
Back To Top
Search