title: How to send additional data to firebase push notification
body: <p>I was able to send push notifications to both Ios/Android using php and curl.Right now i want to update the code to send additional parameters such as user_id,name.So i can get these information on my frontend side.But i don't know how to pass these data.Can anyone please help me.</p>
  <pre><code>function sendPushNotification($token,$push_notification_title=null,$push_notification_body=null){
  
  $url = env('FIREBASE_URL');
  $serverKey = env('FIREBASE_SERVER_KEY');
  $title = $push_notification_title??&quot;New Physician Review&quot;;
  $body = $push_notification_body??&quot;Your case has been reviewed&quot;;
  
  $notification = array('title' =&gt; $title, 'text' =&gt; $body, 'body' =&gt; $body, 'sound' =&gt; 'default', 'badge' =&gt; '1');
  $arrayToSend = array('to' =&gt; $token, 'notification' =&gt; $notification, 'priority' =&gt; 'high', 'data' =&gt; $notification, 'content_available' =&gt; true);
  
  $json = json_encode($arrayToSend);
  $headers = array();
  $headers[] = 'Content-Type: application/json';
  $headers[] = 'Authorization: key=' . $serverKey;
  
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_HEADER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  
  $response = curl_exec($ch);
  
  curl_close($ch);
  
  return $response;
  </code></pre>
  <p>}</p>