sort by date in laravel 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();