update package fcm

This commit is contained in:
2024-05-24 09:43:20 +07:00
parent 8af376cd37
commit 59524159b6
3 changed files with 11 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ class SendNotification extends Notification
public function toFcm($notifiable)
{
return FcmMessage::create()
->setData($this->data) // Menggunakan $this->data
->setData($this->data)
->setNotification([
'title' => $this->title,
'body' => $this->body,

View File

@@ -202,6 +202,11 @@ return [
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
/**
* Package Firebase Cloud Message
*/
NotificationChannels\Fcm\FcmServiceProvider::class,
],
/*

View File

@@ -37,4 +37,9 @@ return [
'redirect' => env('GOOGLE_REDIRECT_URI'),
],
'fcm' => [
'key' => env('FCM_SERVER_KEY'),
'sender_id' => env('FCM_SENDER_ID'),
],
];