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
{{ message }}
Repository navigation
Illuminate\Database\Eloquent\Collection duplicates() doesn't work like Illuminate\Support\Collection #61595
The documentation states that Illuminate\Database\Eloquent\Collection extends all the methods of Illuminate\Support\Collection,
but attempting to use ->duplicates('some_attribute') throws an unexpected exception.
I only realized this when checking the sources; should it be documented that it can't be used, or is it a bug?
Steps To Reproduce
/*MyModel{ id, some_attribute}*/$myList = MyModel::get();
$dup1 = collect($myList)->duplicates('some_attribute'); // this works, base collection was used$dup2 = $myList->duplicates('some_attribute'); // unexpected exception on `$a->is($b)`
Activity