📜  laravel 集合查找重复项 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:50.334000             🧑  作者: Mango

代码示例2
$users = Users::all();
$usersUnique = $users->unique('id');
$usersDupes = $users->diff($usersUnique);

dd($users, $usersUnique, $usersDupes);