1 month ago

How to use Max and Min in Laravel?

Posted 1 month ago by opv


I think laravel is returning my wrong data. Don't know why?

$groups = Groups::where("min", '>=', $result->Z)
    ->where("max", '<=', $result->Z)

Where $result->Z is 52.850294770880225.

In my table, I should able to get the raw-

4 | 47.01 | 52.99 | 0

But I am getting empty instance.

Can you guys help me for that?

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