laravel sort by date format code example
Example: laravel collection sort by date
$sorted = $transaction->sortBy(function($col)
{
return $col;
})->values()->all();
$sorted = $transaction->sortBy(function($col)
{
return $col;
})->values()->all();