Level 88
You can do this
$min = request()->input('min');
$max = request()->input('max');
$products = Product::whereBetween('price', [$mix, $max])->get();
1 like
I am developing a e-commerce website with laravel. I have a price range slider. It gives me min and max values. How can I fetch all the products form the products table between that min and max price?
Please or to participate in this conversation.