Order earnings and spendings on dashboard by happened_on column instead of created_at
MODIFY
app/Http/Controllers/DashboardController.php
app/Http/Controllers/DashboardController.php
@@ -23,13 +23,13 @@ class DashboardController extends Controller {
$recentEarnings = session('space')
->earnings()
- ->orderBy('created_at', 'DESC')
+ ->orderBy('happened_on', 'DESC')
->limit(3)
->get();
$recentSpendings = session('space')
->spendings()
- ->orderBy('created_at', 'DESC')
+ ->orderBy('happened_on', 'DESC')
->limit(3)
->get();

Order earnings and spendings on dashboard by happened_on column instead of created_at