paragraph1\phpFCM\Client::setApiKey PHP Method

setApiKey() public method

add your server api key here read how to obtain an api key here: https://firebase.google.com/docs/server/setup#prerequisites
public setApiKey ( string $apiKey ) : Client
$apiKey string
return Client
    public function setApiKey($apiKey)
    {
        $this->apiKey = $apiKey;
        return $this;
    }

Usage Example

 public function register()
 {
     $this->mergeConfigFrom(config_path('firebase.php'), 'firebase');
     $this->app->singleton(Client::class, function () {
         $client = new Client();
         $client->setApiKey(config('firebase.key'));
         $client->injectHttpClient(new GuzzleHttpClient());
         return $client;
     });
 }