company_key)->first(); } public function getCompanyGateway(): ?CompanyGateway { return CompanyGateway::find($this->decodePrimaryKey($this->company_gateway_id)); } public function getPaymentHash(): ?PaymentHash { return PaymentHash::where('hash', $this->hash)->firstOrFail(); } public function getClient(): ?Client { return Client::find($this->getPaymentHash()->data->client_id); } }