title: How to retrieve data broadcasted via Laravel broadcastWith() in Livewire?
body: <p>I defined the <a href="https://laravel.com/docs/9.x/broadcasting#broadcast-data" rel="nofollow noreferrer">broadcast data</a> via <code>broadcastWith()</code> in my event:</p>
  <pre class="lang-php prettyprint-override"><code>    public function broadcastWith()
      {
          return [
              'name' =&gt; $this-&gt;name,
              'value' =&gt; $this-&gt;value,
          ];
      }
  </code></pre>
  <p>I can receive the event in Livewire via <code>getListeners()</code>:</p>
  <pre class="lang-php prettyprint-override"><code>    public function getListeners()
      {
          return [
              &quot;echo:counters,.CounterUpdated&quot; =&gt; 'refreshCounter',
          ];
      }
  </code></pre>
  <p>However, how can I access the data (i.e. <code>name</code>, <code>value</code>) within the event?</p>
  <p>As a note, the data is passed correctly, as I can receive them via Javascript:</p>
  <pre class="lang-js prettyprint-override"><code>window.Echo.channel('counters')
      .subscribed(() =&gt; {
          console.log(&quot;Subscriped &quot; + &quot;counters&quot;);
      })
      .listen('.CounterUpdated', (e) =&gt; {
          console.log(e);
      });
  </code></pre>