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
I am using toFCM function, but in that there is no where mentioned where to specify the registration_id or device_token to send push.
toFCM
public function toFcm($notifiable) { $message = new FcmMessage(); $message->content([ 'title' => 'Test Push', 'body' => 'Sample push notification', ])->priority(FcmMessage::PRIORITY_HIGH); return $message; }
The text was updated successfully, but these errors were encountered:
Place this code in the model
/** * Route notifications for the FCM channel. * * @param \Illuminate\Notifications\Notification $notification * @return string */ public function routeNotificationForFcm($notification) { return $this->device_token; }
you need to make use of laravel notification feature call on model
php artisan make:notification PushNotification
and Add the method public function toFcm($notifiable) to your notification, and return an instance of FcmMessage:
then use it
$user->notify(new PushNotification($parm));
Sorry, something went wrong.
No branches or pull requests
I am using
toFCM
function, but in that there is no where mentioned where to specify the registration_id or device_token to send push.The text was updated successfully, but these errors were encountered: