You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially this returned USD because it loosely compared the value with true. Then they changed it or at least tried to. There is an issue or discussion that we can't find atm about this.
I believe this is an issue, as the Collection::value() method doesn't return false values like '0', 0, or false even when a match exists. I've opened a PR to address it and am open to any feedback or suggestions!
This value method usage on a collection is not intuitive. Why are people using: get column value from a collection of rows and expect only one value and not a list of column values?
$collection->first()?->column;
would be the logic choice.
Laravel Version
12.13.0
PHP Version
8.3.13
Database Driver & Version
No response
Description
The Collection
value()
method fails to return falsey values such as '0', 0, or false, even when a matching item exists in the collection.Steps To Reproduce
The text was updated successfully, but these errors were encountered: