Ejemplo n.º 1
0
 /**
  * Determine if current user follows another user.
  *
  * @param User $otherUser
  * @return bool
  */
 public function isFollowedBy(User $otherUser)
 {
     $idsWhoOtherUserFollows = $otherUser->followedUsers()->lists('followed_id');
     return in_array($this->id, $idsWhoOtherUserFollows);
 }