public function whenPostPublishedAt(PostPublishedAt $event)
 {
     $post = $this->posts->find($event->postId());
     $this->posts->save(new PostList($post->id(), $post->authorId(), $post->title(), $post->content(), $post->type(), $event->publishedAt()));
 }
Exemplo n.º 2
0
 public function applyPostPublishedAt(PostPublishedAt $event)
 {
     $this->published_at = $event->publishedAt();
 }