Download the PHP package weelis/notification without Composer
On this page you can find all versions of the php package weelis/notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download weelis/notification
More information about weelis/notification
Files in weelis/notification
Package notification
Short Description Weelis Notification Channel (APN, FCM, SMS, EMAIL)
License
Informations about the package notification
laravel-weelis-notification
Weelis Notification Channel (APN, FCM, ESMS)
Use this package to send push notifications via Laravel to Firebase Cloud Messaging, APN, ESMS. Laravel 5.3+ required.
Install
This package can be installed through Composer.
Once installed, add the service provider:
Publish the config file:
Register device
Using existing controller add this to your route
Using notification database model & report
Using facade
Setting up the FCM service
The following config file will be published in config/notification.php
. Add your Firebase API Key here.
Set up .env file
OR
Example Usage
Use Artisan to create a notification:
Return [fcm]
in the public function via($notifiable)
method of your notification:
Add the method public function toFcm($notifiable)
to your notification, and return an instance of FcmMessage
:
When sending to specific device, make sure your notifiable entity has routeNotificationForFcm
method defined:
When sending to a topic, you may define so within the toFcm
method in the notification:
Setting up the APN service
Before using the APN Service, follow the Provisioning and Development guide from Apple
You will need to generate a certificate for you application, before you can use this channel. Configure the path in config/broadcasting.php
Set up .env file
Usage
You can now send messages to APN by creating a ApnMessage:
Return [apn]
in the public function via($notifiable)
method of your notification:
In your notifiable model, make sure to include a routeNotificationForApn() method, which return one or an array of tokens.
Setting up the ESMS service
Set up .env file
Usage
You can now send messages to Esms:
Return [esms]
in the public function via($notifiable)
method of your notification:
When sending to specific device, make sure your notifiable entity has routeNotificationForEsms
method defined:
Sending user channel
License
This project belong to vias company.
All versions of notification with dependencies
illuminate/events Version ^5.1|^5.2|^5.3
illuminate/notifications Version ^5.3
illuminate/support Version ^5.1|^5.2|^5.3
illuminate/queue Version ^5.1|^5.2|^5.3
zendframework/zendservice-apple-apns Version ^1.2