title: How to send notification with image to IOS and android in PHP
body: <p>I have a Laravel app in which I use some code to send FCM to send notification to IOS and Android, but now I need to include and image in the notification.
  the code I am using now is as below</p>
  <pre><code>$fcmUrl =   'https://fcm.googleapis.com/fcm/send';
          $notification = [
              'body' =&gt; 'Message',
              'title'=&gt;'title',
              'sound' =&gt; true,
              'priority' =&gt; &quot;high&quot;,
              'vibration'=&gt;true,
              'sound'=&gt; &quot;Enabled&quot;,
              'badge'=&gt;4,
              'id'=&gt;2
              ];
  
          $extraNotificationData = ['one'=&gt;1,'two'=&gt;2];
        
          $fcmNotification = [
              //'registration_ids' =&gt; json_encode($token,JSON_FORCE_OBJECT), //multple token array
              'to' =&gt; $this-&gt;token, //single token
              'data' =&gt; $extraNotificationData,
              'notification' =&gt; $notification
          ];
  
          $headers = [
              'Authorization: key=Server_key',
              'Content-Type: application/json'
          ];
  
          $ch = curl_init();
          curl_setopt($ch, CURLOPT_URL, $fcmUrl);
          curl_setopt($ch, CURLOPT_POST, true);
          curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
          curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fcmNotification));
          $result = curl_exec($ch);
          curl_close($ch); 
  </code></pre>