dev-master
9999999-dev https://github.com/roozbeh360/PushNotificationBundlesymfony push notification bundle for ios , android devices .
MIT
The Requires
symfony2 bundle notification push
Wallogit.com
2017 © Pedro Peláez
symfony push notification bundle for ios , android devices .
symfony push notification bundle for ios , android devices . based on Ph3nol/NotificationPusher ., (*1)
https://github.com/Ph3nol/NotificationPusher, (*2)
composer require rth/notification-bundle "dev-master"
in your AppKernel.php file add following line :, (*3)
public function registerBundles()
{
$bundles = array(
.
.
.
.
new Rth\NotificationBundle\RthNotificationBundle(), // push notification bundle
)
}
now add these lines in app/config.yml, (*4)
parameters:
r360_notification.apns.pem: "%kernel.root_dir%/config/apple.pem" # could be production or sandbox/dev
r360_notification.gcm.key: "api_key" # google api key for push
r360_notification.env: prod # environment depends on your key for pem file
update database schema, (*5)
doctrine:schema:update --force
add device to database, (*6)
$notificaionManager = $this->get('r360_notification.service');
$notificaionManager->addDevice($os, $token);
send push notification, (*7)
$notificaionManager = $this->get('r360_notification.service');
$notificaionManager->sendNotifications(Device_entity, 'i have send 1 push to device' );
add device entity to any entities, (*8)
<one-to-one field="device" target-entity="Rth\NotificationBundle\Entity\Device">
<join-column name="device_id" referenced-column-name="id" />
</one-to-one>
$notificaionManager = $this->get('r360_notification.service');
$notificaionManager->addDevice($os, $token, $entity );
many many things ., (*9)
https://github.com/Ph3nol/NotificationPusher
symfony push notification bundle for ios , android devices .
MIT
symfony2 bundle notification push