diff --git a/routes/web.php b/routes/web.php index fca7097f..5d4fdcfc 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1172,9 +1172,9 @@ Route::get('/duplicate-package-clean-up', function(){ } // Delete all rows in the group except the first one (oldest based on created_at) $firstRow = $rows->shift(); -// foreach ($rows as $row) { -// Package::where('packages')->where('id', $row->id)->delete(); -// } + foreach ($rows as $row) { + Package::where('packages')->where('id', $row->id)->delete(); + } // Calculate the case age for the group (assuming case age means difference between current date and created_at of the oldest row) $caseAge = Carbon::now()->diffInDays(Carbon::parse($firstRow->created_at));