benwilkins / laravel-fcm-notification

Laravel FCM (Firebase Cloud Messaging) Notification Channel
MIT License
213 stars 91 forks source link

Unable to create the messaging service without a project ID #84

Open jaimincygnet opened 6 months ago

jaimincygnet commented 6 months ago

`use Benwilkins\FCM\FcmMessage;

...

public function toFcm($notifiable) { $message = new FcmMessage(); $message->setHeaders([ 'project_id' => "48542497347" // FCM sender_id ])->content([ 'title' => 'Foo', 'body' => 'Bar', 'sound' => '', // Optional 'icon' => '', // Optional 'click_action' => '' // Optional ])->data([ 'param1' => 'baz' // Optional ])->priority(FcmMessage::PRIORITY_HIGH); // Optional - Default is 'normal'.

return $message;

}`

Perform this step but still facing this error " Unable to create the messaging service without a project ID "

"php": "^7.2|^8.0", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "laravel-notification-channels/fcm": "2.7.0", "laravel/framework": "^8.75",