public function whenPostCategorized(PostCategorized $event)
 {
     $post = $this->posts->find($event->postId());
     $this->posts->save(new PostList($post->id(), $post->authorId(), $post->title(), $post->content(), $event->type(), $post->publishedAt()));
 }
예제 #2
0
 public function applyPostCategorized(PostCategorized $event)
 {
     $events->type = $event->type();
 }