Example #1
0
 public function handle($request)
 {
     $thread = $this->threadRepository->getBySlug($request->slug);
     if (!$thread) {
         throw new EntityNotFoundException();
     }
     $replies = $this->replyRepository->getRepliesForThread($thread, $request->page, $request->repliesPerPage);
     return new ViewThreadResponse($thread, $replies);
 }