Example #1
0
 public function handle($command)
 {
     $comment = $this->commentRepository->getById($command->commentId);
     $comment->edit($command->content);
     $this->commentRepository->save($comment);
     return new EditCommentResponse($comment);
 }
 public function handle($command)
 {
     $comment = $this->commentRepository->getById($command->commentId);
     $this->commentRepository->delete($comment);
     return new DeleteCommentResponse($comment);
 }