I am retrieving users using many to many relationships. I want to loop through the user only one time that have two entries in pivot. e.g.
$admin = Admin::first();
$users = $admin->users;
foreach($users as $user) {
//Iterate through users that has different ids
//Do not iterate over same user twice
}