KACKbIP
4 months ago
483
16
Laravel

Hi everyone whereBetween doesn't work properly somehow

Posted 4 months ago by KACKbIP
 $products = Product::whereIn('id', $plucked)->whereBetween('price',
                        array($minPrice, $maxPrice))->get();

It works fine when I add a maxPrice number by hand. When I try to do it from my input it doesn't work properly. I have checked the value of $maxPrice. I have got a number there, but somehow it doesn't work ((

Please sign in or create an account to participate in this conversation.