belongsTo(PrescricaoInterna::class); } public function medicamento() { return $this->belongsTo(Medicamento::class)->withTrashed(); } public function unidadeMedida() { return $this->belongsTo(UnidadeMedida::class); } public function aplicacoes() { return $this->hasMany(PrescricaoInternaMedicamentoAplicacao::class); } public function getQuantidadeAttribute($value) { return str_replace('.', ',', $value); } public function getIsAllowedToDeleteAttribute() { return $this->hasNoOne([ // Relations. ]); } }