$this->dataId, 'text' => $this->noteText, 'created' => now(), 'created_by' => auth()->id() ?? 0, ]); $this->noteText = ''; $this->refreshNotes(); } public function removeNote($id) { ReportProtocolloNote::findOrFail($id)->delete(); $this->refreshNotes(); } private function refreshNotes() { $this->notes = ReportProtocolloNote::where('report_id', $this->dataId)->get(); } }