Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1.  
  2. function laporandarurat(Request $request){
  3. $notificationBuilder = new PayloadNotificationBuilder('Darurat');
  4. $notificationBuilder->setBody('Hello world')
  5. ->setSound('default');
  6.  
  7. $notification = $notificationBuilder->build();
  8.  
  9. $topic = new Topics();
  10. $topic->topic('news');
  11.  
  12. $topicResponse = FCM::sendToTopic($topic, null, $notification, null);
  13. if($topicResponse->isSuccess()){
  14.  
  15. }else{
  16.  
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement