laravel collection sort data equal now date 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();