Laravel treating decimal as string

Viewed 4320

Im trying to make the next eloquent query

$result = $result->where('money','>=',(float)$moneyFilter);

The money column in my database its DECIMAL(11,2), when I run the query it returns an empty array, when I go over php artisan tinker and see the column money, it's a string value "11.1".

I would like to filter the $result collection to have values over $moneyFilter.

Thanks

1 Answers
Related