invoice_ids); if(count($invoices) >= 1) { foreach($invoices as $invoice){ if(is_string($invoice) && strlen($invoice) > 1) $collection->push($this->decodePrimaryKey($invoice)); } } return $collection; } public function getEntityType() { return self::class; } public function company() { return $this->belongsTo(Company::class); } public function vendor() { return $this->belongsTo(Vendor::class); } public function expense() { return $this->belongsTo(Expense::class); } public function user() { return $this->belongsTo(User::class)->withTrashed(); } public function bank_integration() { return $this->belongsTo(BankIntegration::class)->withTrashed(); } public function account() { return $this->belongsTo(Account::class)->withTrashed(); } public function service() :BankService { return new BankService($this); } }