currency === null) { $this->currency = $this->childOf(Currency::class, [Model::SELF_KEY => 'currency_id']); } return $this->currency; } protected $base; public function base(): ?Currency { if ($this->base === null) { $this->base = $this->childOf(Currency::class, [Model::SELF_KEY => 'base_id']); } return $this->base; } }