laravel-fcm-notification
laravel-fcm-notification copied to clipboard
Unable to create the messaging service without a project ID
`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",