This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi all,
I started a little website with OctoberCMS and so far I'm loving it. My next wish is to build a simple real time chat using Pusher. I signed up at Pusher and made sure everything was working by testing one of their tutorials. Next up I wish to integrate it in my plugin, I found and set the broadcasting properties for Pusher (config/broadcasting.php), but I don't know the right way to call the service in my plugin. Basically I'm looking to substitute the following code from the Pusher PHP example:
require('Pusher.php');
$pusher = new Pusher("APP_KEY", "APP_SECRET", "APP_ID");
$pusher->trigger('test_channel', 'my_event', array('message' => 'hello world') );
Last updated
Hi
Maybe this anwser will help you
http://stackoverflow.com/questions/40429347/including-pusher-php-server-in-octobercms-with-vinkla-pusher-bridge
You need to registere the service provider in the boot() function of Plugin.php
Last updated
answer from @luketowers in Slack:
Use the Pusher PHP library directly instead of through the Laravel bridging package (because it requires Laravel 5.3 at minimum and October uses 5.1 LTS) Then you should just be able to
use Pusher;
at the top of your code and use it as per normal
Last updated
1-3 of 3