Download the PHP package mrad/notifications-bundle without Composer
On this page you can find all versions of the php package mrad/notifications-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrad/notifications-bundle
More information about mrad/notifications-bundle
Files in mrad/notifications-bundle
Package notifications-bundle
Short Description Implement notifications system in your symfony project using Pusher API
License MIT
Informations about the package notifications-bundle
NotificationsBundle
A simple implementation for Pusher API that helps you integrate a notifications system in a few simple steps.
Installation
composer require mrad/notifications-bundle
- Enable the bundle in AppKernel.php
new SBC\NotificationsBundle\NotificationsBundle(),
Usage
Step 1:
First thing you need to create an account with Pusher and then in Your apps menu create a new app.
Step 2:
Add you app configuration to the app/config.yml
:
Of course you can find those details in your app in the dashboard.
Step 3:
Now in your view.html.twig
(your client side) add this:
And that's it :smiley:, now to make sure that your client is receiving the data correctly you can test it by calling this
console command:
php bin/console notifications:trigger "Your message" "channel"
If you open the browser's console you should see something like this:
Broadcast custom messages from Backend
To broadcast messages from your backend you can simply do this:
Next Step
Now I will show how to create and save notifications in database.
- Create and persist notifications
License
This project is under the MIT license
Videos
You can check this playlist for more details about how This bundle works.
Thanks
Thanks to SlimenTN for his help in this project
All versions of notifications-bundle with dependencies
symfony/framework-bundle Version ^2.8 || ^3.0
pusher/pusher-php-server Version ^3.0