eloquent order by date and time 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();