revers relation changes..
This commit is contained in:
		| @@ -23,7 +23,7 @@ class Accounts extends Controller | ||||
|      */ | ||||
|     public function index() | ||||
|     { | ||||
|         $accounts = Account::with('transactions')->collect(); | ||||
|         $accounts = Account::with('income_transactions', 'expense_transactions')->collect(); | ||||
|  | ||||
|         return $this->response('banking.accounts.index', compact('accounts')); | ||||
|     } | ||||
|   | ||||
| @@ -15,7 +15,7 @@ class AccountBalance extends Widget | ||||
|  | ||||
|     public function show() | ||||
|     { | ||||
|         $accounts = Account::with('transactions')->enabled()->take(5)->get()->map(function($account) { | ||||
|         $accounts = Account::with('income_transactions', 'expense_transactions')->enabled()->take(5)->get()->map(function($account) { | ||||
|             $account->balance_formatted = money($account->balance, $account->currency_code, true); | ||||
|  | ||||
|             return $account; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user