Closed syahroel712 closed 2 weeks ago
Hi. What was the solution to your problem? Ran into the same issue.
Hi. What was the solution to your problem? Ran into the same issue.
hi, for this problem I tried another way, I didn't use fcm anymore, I changed to kreait/firebase-php. here are the settings in my composer. "require": { "firebase/php-jwt": "^6.3.2", "creait/firebase-php": "^7.0" }
I hope this can help you
hello sir, I have a problem suddenly my fcmtoken is not working anymore, I use version 2.7.0 in laravel 8.83 with php version 7.4.
please help how to fix it because when I try to debug and see in laravel.log then the result is successfully sent, but unfortunately the notification does not appear on the mobile.
here is my code:
in controller: `public function testKirimNotifikasi(Request $request) { $pesan = $request->input('pesan', 'Pesan default untuk notifikasi.'); $user_id = $request->input('user_id');
in notification: `<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Notification; use NotificationChannels\Fcm\FcmMessage;
class FirebaseNotification extends Notification { use Queueable;
}`
in laravel.log:
local.INFO: FCM Message Created: {"message":"{\"name\":null,\"data\":null,\"notification\":{\"title\":\"Title\",\"body\":\"Pesan default untuk notifikasi.\",\"image\":null},\"android\":null,\"webpush\":null,\"apns\":null,\"fcm_options\":null}"}
in my respon:
{"success":true,"message":"Notifikasi berhasil dikirim."}