Replies: 1 comment 1 reply
-
It would make sense if it were to return anything to return duplicates based on two keys. Have you tried that? because in that case the docblock is wrong. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://laravel.com/docs/11.x/collections#method-duplicates the source for this suggests that it can take a callable, but that the callable should return a boolean value, though that callable is immediately passed to map. It feels wrong for that to return bool, since (at least my understanding) is that the callable would be used to select the items in the collection that make an individual collection record unique. Am I misunderstanding the use-case for a callable being passed to duplicates?
Beta Was this translation helpful? Give feedback.
All reactions