'object' ]; public function client() { return $this->belongsTo(Client::class); } public function company() { return $this->belongsTo(Company::class); } public function user() { return $this->belongsTo(User::class); } public function documents() { return $this->morphMany(Document::class, 'documentable'); } public function invoices() { return $this->morphedByMany(Invoice::class, 'paymentable'); } public function company_ledger() { return $this->morphMany(CompanyLedger::class, 'company_ledgerable'); } public function type() { return $this->hasOne(PaymentType::class,'id','payment_type_id'); } public static function badgeForStatus(int $status) { switch ($status) { case self::STATUS_PENDING: return '