From 92d1d6562d9d3ebf4dbc35ef0d764a67f158b395 Mon Sep 17 00:00:00 2001 From: Patrick Samson Date: Mon, 3 Nov 2014 19:31:28 -0500 Subject: [PATCH] Fixed SQL query on dashboard It did not work properly before on Postgres --- app/controllers/DashboardController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index a1d7a6f220fe..72f060ad0870 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -19,7 +19,7 @@ class DashboardController extends \BaseController { ->groupBy('accounts.id') ->first(); - $select = DB::raw('SUM(clients.paid_to_date) value'); + $select = DB::raw('SUM(clients.paid_to_date) as value'); $totalIncome = DB::table('accounts') ->select($select) @@ -62,4 +62,4 @@ class DashboardController extends \BaseController { return View::make('dashboard', $data); } -} \ No newline at end of file +}