laravel-notification-channels / onesignal

OneSignal notifications channel for Laravel
MIT License
283 stars 119 forks source link

Need help with setting this up on Laravel 5.8 #108

Open umsuka opened 4 years ago

umsuka commented 4 years ago

Hi Guys

Sorry to ask here but maybe I will get assistance, I am setting this plugin up on my project and I dont know if I am doing something wrong cause I am not getting any notifications.

I want to sent a notification to a specific user using a tag which is registered with one signal when a user logs in on the mobile app and also on the web backend.

This is how I have the tag setup,

public function routeNotificationForOneSignal($notifiable)
{
    return ['tags' => ['key' => 'user_id', 'relation' => '=', 'value' => $notifiable->ticket->user_id]];
}
RomuloRPS commented 4 years ago

Try to modify your function routeNotificationForOneSignal($notifiable) to routeNotificationFor($notifiable), worked for me.