示例#1
0
 /**
  * Store a new reply to the database
  *
  * @param $data
  * @return static
  * @throws \Exception
  */
 public function store($data)
 {
     $note = $this->noteRepository->findByUuid($data['noteUuid'], [], ['id']);
     return $this->replyRepository->store(['note_id' => $note->id, 'index' => $data['index'], 'from_id' => user()->id, 'uuid' => (string) Uuid::generate(4)]);
 }
示例#2
0
 /**
  * Delete a note from the database
  *
  * @param $uuid
  * @return mixed
  */
 public function delete($uuid)
 {
     return $this->noteRepository->deleteByUuid($uuid);
 }