currency === null) { $this->currency = $this->childOf(Currency::class, [Model::SELF_KEY => 'currency_id']); } return $this->currency; } public function frecuency(\DateInterval $frecuency = null) { if ($frecuency == null) { return new \CarbonInterval($this->fecuency); } $this->frecuency = CarbonInterval::getDateIntervalSpec($frecuency); } }