Order budgets by name.

This commit is contained in:
James Cole 2015-02-27 12:02:14 +01:00
parent 9a7ea06d66
commit 7b68d9047d

View File

@ -65,6 +65,7 @@ class ReportController extends Controller
$data = $budget->toArray();
$array[$id] = $data;
}
$account->budgetInformation = $array;
$account->balancedAmount = $balancedAmount;
@ -77,7 +78,7 @@ class ReportController extends Controller
/**
* Start getBudgetsForMonth DONE
*/
$set = Auth::user()->budgets()
$set = Auth::user()->budgets()->orderBy('budgets.name', 'ASC')
->leftJoin(
'budget_limits', function (JoinClause $join) use ($date) {
$join->on('budget_limits.budget_id', '=', 'budgets.id')->where('budget_limits.startdate', '=', $date->format('Y-m-d'));