title: Firebase push notifications with Kreait
body: <p>Im using Kreait for sending my firebase push notifications. Ive successfully implemented it but eveytime I try to send the request I get a 404 url does not exist error (Client error: <code>POST https://fcm.googleapis.com/v1/projects/project-id/messages:send</code> resulted in a `404 Not Found). I have my google authentication json file in the same directory as my php files.</p>
  
  <p>Code:</p>
  
  <pre><code>$serviceAccount = ServiceAccount::fromJsonFile(__DIR__.'/google.json');
  
  $firebase = (new Factory)
          -&gt;withServiceAccount($serviceAccount)
          // The following line is optional if the project id in your credentials file
          // is identical to the subdomain of your Firebase project. If you need it,
          // make sure to replace the URL with the URL of your project.
          //-&gt;withDatabaseUri('https://my-project.firebaseio.com')
          -&gt;create();
  
  $messaging = $firebase-&gt;getMessaging();
  
  $deviceToken = 'token';
  
  $notification = Notification::create("test", "body");
  $data = [
     'first_key' =&gt; 'First Value',
     'second_key' =&gt; 'Second Value',
  ];
  
  $message = CloudMessage::withTarget('token', $deviceToken)
       -&gt;withNotification($notification) // optional
       -&gt;withData($data);
  
  // error here
  // 404 Client error: `POST https://fcm.googleapis.com/v1/projects/projectid/messages:send` resulted in a `404 Not Found
  $messaging-&gt;send($message);
  </code></pre>