I am building a test application using Pusher for Laravel 4 real-time notification. Since I am testing the specified API, I am having difficulty with its operation.
I have this on my routes.php :
Route::get('pusher-test', function(){ return View::make('pages.test'); }); Route::any('test', function(){ $pusher = new Pusher('key','sect','app_key');
Then my pusherTest.js file:
(function(){ var pusher = new Pusher('key'); var channel = pusher.subscribe('notificationChannel'); channel.bind('userRegistration', function(data){ $('.test').append('HEY!'); }); })();
My view page:
<html> <head> <meta charset="utf-8"> {{ HTML::style('_/css/bootstrap.css') }} {{ HTML::style('_/css/mystyle.css') }} </head> <body> <h2>HI!</h2> <div class="test"></div> {{ HTML::script('_/js/bootstrap.js') }} {{ HTML::script('_/js/jquery.js') }} {{ HTML::script('_/js/pusher/pusher.min.js')}} {{ HTML::script('_/js/pusherTest.js')}} </body> </html>
When I try to watch my application’s Debug Console on Pusher.com, this is what I see: 
But when I hit the test route, it does not send an event to my Pusher application, and it does not send an API message to my client. But if I use the Create new Event tester on the debug console, I’m sure enough that it will send an API message and my client will receive and update it. 
Why do you think he cannot send an event to my pusher application on my route? I can not understand, because there is no exception error. Please advice.
source share