revers relation changes..
This commit is contained in:
parent
94dda670e6
commit
9c5a4f9d12
@ -23,7 +23,7 @@ class Accounts extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$accounts = Account::with('transactions')->collect();
|
$accounts = Account::with('income_transactions', 'expense_transactions')->collect();
|
||||||
|
|
||||||
return $this->response('banking.accounts.index', compact('accounts'));
|
return $this->response('banking.accounts.index', compact('accounts'));
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ class AccountBalance extends Widget
|
|||||||
|
|
||||||
public function show()
|
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);
|
$account->balance_formatted = money($account->balance, $account->currency_code, true);
|
||||||
|
|
||||||
return $account;
|
return $account;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user