To use this feature, you must sync the E-Mail first with OneSignal and than change the Method "routeNotificationForOneSignal()" on your notifiable Model to something like this:
public function routeNotificationForOneSignal()
{
return ['email' => 'test@example.com'];
}
Because of the new index 'email' the package knows that it should use the email filter instead of the OneSignalUserId.
Actually it isn't possible to use an array with multiple E-Mails, because of a limitation from the OneSignal Api.
This PR keeps the BC and doesn't require a change to existing installations of the package.
As wished from many parts and needed by myself, hear it comes.
After this PR it is possible to send a Notification Based on the User E-Mail.(https://documentation.onesignal.com/docs/email-syncing-and-targeting)
To use this feature, you must sync the E-Mail first with OneSignal and than change the Method "routeNotificationForOneSignal()" on your notifiable Model to something like this:
Because of the new index 'email' the package knows that it should use the email filter instead of the OneSignalUserId.
Actually it isn't possible to use an array with multiple E-Mails, because of a limitation from the OneSignal Api.
This PR keeps the BC and doesn't require a change to existing installations of the package.