Laravel elokwentne uzyskanie danych bez duplikatów
MyModel::distinct()->get(['column_name']);
Salaba
MyModel::distinct()->get(['column_name']);
// Retrieve the first task
$task = Task::first();
$newTask = $task->replicate();
$newTask->project_id = 16; // the new project_id
$newTask->save();