public function setDataOcorrencia($dataOcorrencia) { $this->dataOcorrencia = trim($dataOcorrencia, '0 ') ? Carbon::createFromFormat('dmy', $dataOcorrencia) : null; return $this; }