title: Send Notifications from Multiple Private Channels in Laravel Broadcasts
body: <p>I configured <code>pusher</code>, <code>Laravel Broadcasting</code>, <code>Laravel Echo</code> to send notifications to my users. It is working fine for the single private channel.</p>
  
  <p>I have Two Private Channels.</p>
  
  <ol>
  <li>App.User{id}</li>
  <li>YouthAdd.YouthAdd{id}</li>
  </ol>
  
  <p>But Notifications are passed only through <code>App.User{id}</code> Channel</p>
  
  <p>How can I send notifications from  other channel too ?</p>
  
  <p><strong>My User Class</strong>
  
  <pre><code>namespace App;
  
  use Illuminate\Broadcasting\PrivateChannel;
  use Illuminate\Foundation\Auth\User as Authenticatable;
  use Illuminate\Notifications\Notifiable;
  
  class User extends Authenticatable
  {
      use Notifiable;
  
      /**
       * The channels the user receives notification broadcasts on.
       *
       * @return string
       */
      public function receivesBroadcastNotificationsOn()
      {
          return 'App.User.'.$this-&gt;id;
          return 'YouthAdd.YouthAdd.'.$this-&gt;id;
      }
  }
  </code></pre>
  
  <p><strong>My Channels.php Route file</strong></p>
  
  <pre><code>Broadcast::channel('App.User.{id}', function ($user, $id) {
      return (int) $user-&gt;id === (int) $id;
  });
  
  Broadcast::channel('YouthAdd.YouthAdd.{id}', function ($user, $id) {
      return (int) $user-&gt;id === (int) $id;
  });
  </code></pre>
  
  <p><strong>My Front End</strong></p>
  
  <pre><code>&lt;script&gt;
    var userId = $('meta[name="userId"]').attr('content');
      Echo.private('App.User.' + userId)
      .notification((notification) =&gt; {
          toastr.warning(notification.title, notification.name, {closeButton: true, timeOut: 5000000});
      });
  
  
        Echo.private('YouthAdd.YouthAdd.' + userId)
        .notification((notification) =&gt; {
            console.log(notification.youth);
            toastr.error(notification.youth.name, notification.youth.nic, {closeButton: true, timeOut: 5000000});
        });
  
      &lt;/script&gt;
  </code></pre>
  
  <p>Anyone can answer this ? </p>