By endroid
This bundle enables easy integration of real-time features provided by Pusher
.
- Symfony
- Dependencies:
Use Composer to install the bundle.
$ composer require endroid/pusher-bundle
Then enable the bundle via the kernel.
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = [
// ...
new Endroid\PusherBundle\EndroidPusherBundle(),
];
}
endroid_pusher:
app_id: ...
key: ...
secret: ...
<?php
$pusher = $container->get('endroid_pusher.pusher');
$pusher->trigger('my_channel', 'my_event', ['message' => 'my_message']);
The service returns the Pusher object as defined by the Pusher PHP Library
.
Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.
This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.