company = $company; } public function getCurrencyCodes() { $currencies = Payment::withTrashed() ->where('company_id', $this->company->id) ->where('is_deleted', 0) ->distinct() ->get(['currency_id']); $expense_currencies = Expense::withTrashed() ->where('company_id', $this->company->id) ->where('is_deleted', 0) ->distinct() ->get(['expense_currency_id']); $currencies = $currencies->merge($expense_currencies)->unique(); } }