pusher gives no call back
<p>I am trying to test a basic pusher trigger event that gives me a simple alert and a console log, but it wont work. The response is received from the pusher console debug but there are no alerts. I am using laravel 5.3 and its routes and a view for this. Below is my code. I have censored the sensitive information.</p>

<p>route file web.php</p>

<pre><code>Route::get('/bridge', function() {

    error_reporting(E_ALL);

    $options = array(
        'cluster' =&gt; 'ap1',
        'encrypted' =&gt; true
    );
    $pusher = new Pusher(
        'key censored',
        'secret censored',
        'app id censore',
        $options
    );

    $data['message'] = 'hello world';
    $pusher-&gt;trigger('test_channel', 'my_event', $data);

    return view('pusher');
});
</code></pre>

<p>and view pusher.blade.php</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;head&gt;
    &lt;title&gt;Pusher Test&lt;/title&gt;
    &lt;script src="https://js.pusher.com/3.2/pusher.min.js"&gt;&lt;/script&gt;
    &lt;script&gt;

        // Enable pusher logging - don't include this in production
        Pusher.logToConsole = true;

        var pusher = new Pusher('e5bbf707214a6223d044', {
            cluster: 'ap1',
            encrypted: true
        });

        var channel = pusher.subscribe('test_channel');
        channel.bind('my_event', function(data) {
           alert(data);
            console.log(data);
        });
    &lt;/script&gt;
&lt;/head&gt;
</code></pre>

<p>chrome console gives me the following logs.</p>

<pre><code>Pusher : State changed : initialized -&gt; connecting
Pusher : Connecting : {"transport":"ws","url":"wss://ws-ap1.pusher.com:443/app/censored key?protocol=7&amp;client=js&amp;version=3.2.2&amp;flash=false"}
Pusher : State changed : connecting -&gt; connected with new socket ID 5034.8700909
Pusher : Event sent : {"event":"pusher:subscribe","data":{"channel":"test_channel"}}
Pusher : Event recd : {"event":"pusher_internal:subscription_succeeded","data":{},"channel":"test_channel"}
Pusher : No callbacks on test_channel for pusher:subscription_succeeded
</code></pre>