Exemple #1
0
 /**
  * SHow all of the likes a post has received.
  *
  * @param int $postId The ID of the post to show the likes for.
  *
  * @return \Illuminate\View\View
  */
 public function getPostLikes($postId)
 {
     $post = $this->postsRepository->find($postId);
     if (!$post) {
         throw new PostNotFoundException();
     }
     $post->load('topic');
     $likes = $this->likesRepository->getAllLikesForContentPaginated($post, $this->settings->get('likes.per_page', 10));
     return view('post.likes', compact('post', 'likes'));
 }