We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I would like to clean up unregistered device tokens from my database on notification channels.
Following code works as expected with manual push message.
$user = User::where('username', 'abc')->first(); $tokensApns = $user->pushTokens()->where('type', 'APNS')->pluck('token')->toArray(); dump($tokensApns); $push = new PushNotification('apn'); $payload = [ 'aps' => [ 'alert' => 'Hola mundo', 'badge' => 1, 'sound' => 'default' ] ]; $push->setMessage($payload) ->setDevicesToken($tokensApns) ->send(); $feedback = $push->getFeedback(); dump($feedback); UserPushToken::whereIn('token', $feedback->tokenFailList)->delete();
But how can I achieve the same thing into "toApn" method ? Moreover my Notifications are queued so where/when/how can I catch invalid tokens ?
Thank you
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I would like to clean up unregistered device tokens from my database on notification channels.
Following code works as expected with manual push message.
But how can I achieve the same thing into "toApn" method ? Moreover my Notifications are queued so where/when/how can I catch invalid tokens ?
Thank you
The text was updated successfully, but these errors were encountered: