title: Laravel : Pusher listen for private channel with unique id
body: <p>I have a news feed, If user <code>X</code> commented on user <code>Y</code>'s post then user <code>Y</code> should get a notification. <strong>Now the issue is that user <code>Y</code> dont have to the post id on which user <code>X</code> commented on :</strong></p>
  
  <pre><code>// Create comment 
  $comment = new Comment;
  $comment-&gt;post_id = $post_id;
  $comment-&gt;user_id = $user_id;
  $comment-&gt;body = $body;
  $comment-&gt;save();
  
  // Save activity in database
  $newUser = PostActivity::firstOrCreate([
      'post_id'   =&gt; $post_id,
  ],[
      'user_id' =&gt; Auth::user()-&gt;id,
      'post_id' =&gt; $post_id,
      'seen'    =&gt; '0'
  ]);
  
  // Dispatch event with newly created comment
  
  FeedCommentActivity::dispatch($comment);
  </code></pre>
  
  <p>The event :</p>
  
  <pre><code>public function broadcastOn()
  {
      return new PrivateChannel('post-comment-activity.' .$this-&gt;activity-&gt;post_id);
  }
  </code></pre>
  
  <p>The channel :</p>
  
  <pre><code>Broadcast::channel('post-comment-activity.{postId}', function ($user, $postId) {
      // Lets say true for the time
      return true;
  });
  </code></pre>
  
  <p><strong>And the listener, This is where my question arises that how can <code>postId</code> will come up here :</strong></p>
  
  <blockquote>
    <p>From where the <code>postId</code> will come to listen and match the channel is
    listening .</p>
  </blockquote>
  
  <pre><code>window.Echo.channel('post-comment-activity' + postId)
          .listen('FeedCommentActivity', e =&gt; {
      console.log('New comment by a user');
      console.log(e);
  });
  </code></pre>
  
  <p><strong>I want to notify the participator or the owner of the post to be notified when a new comment comes up.</strong> </p>
  
  <blockquote>
    <p>What will be the way around it ? Any alternate way ?</p>
  </blockquote>