$users = Users::all();
$usersUnique = $users->unique('id');
$usersDupes = $users->diff($usersUnique);
dd($users, $usersUnique, $usersDupes);
$data = Model::find(1);
$new_data = $data->replicate();
$new_data->created_at = now();
$new_data->save();
$users = User::all();
$usersUnique = $users->unique(['user_name']);
$userDuplicates = $users->diff($usersUnique);
echo "<pre>";
print_r($userDuplicates->toArray());
// Retrieve the first task
$task = Task::first();
$newTask = $task->replicate();
$newTask->project_id = 16; // the new project_id
$newTask->save();
add validation rule 'distinct'