📜  laravel 从数组中删除重复项 - PHP 代码示例

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

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

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