Send Firebase Push Notifications with Laravel HTTP v1 | Android & iOS

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

ความคิดเห็น • 14

  • @soyelghosh662
    @soyelghosh662 หลายเดือนก่อน +1

    Thanks 👍🏻

    • @RiyastCollege
      @RiyastCollege  หลายเดือนก่อน +1

      You're welcome! 😊 I'm glad you found the video helpful. If you have any questions or need further guidance, feel free to ask. Your feedback means a lot-what topic would you like to see next?

  • @AllawiHabibGalbi
    @AllawiHabibGalbi 17 วันที่ผ่านมา +1

    Hi brother, i didn't find the pushnotification.php in the traits folder

    • @RiyastCollege
      @RiyastCollege  16 วันที่ผ่านมา

      hi brother this is Traits

  • @codescafe42692
    @codescafe42692 หลายเดือนก่อน +1

    How to send notification with multiple tokens or send notification with topic in laravel , please explain

    • @RiyastCollege
      @RiyastCollege  หลายเดือนก่อน

      public function sendfirebaseNotification(Request $request)
      {
      $tokens = [
      "ecfkA1kGQiSRWR-dat4R9a:APA91bFnTAMOi5fFLrb3sHJ9wNnYx3ockp0Syv9EvFSgEUjeKxhOu60DkA7gN5ut2rl5Y7ghkDDLBWKRY8JR3Txr5CRnJ_R9jIzeleYqSBPGWq-u8LMVx0E",
      "other_token_here",
      "another_token_here"
      ]; // Add multiple tokens here
      $notification = [
      'title' => "Testing",
      'body' => "body",
      'icon' => "icon name",
      'sound' => 'default',
      'screen_type' => "Testing",
      ];
      $extraNotification = [
      "message" => $notification,
      "moredata" => $request->moredata
      ];
      $fcmNotification = [
      'registration_ids' => $tokens, // Array of tokens
      'notification' => $notification,
      'data' => $extraNotification,
      ];
      $response = $this->sendNotification($fcmNotification);
      return response()->json($response, 200);
      }

    • @RiyastCollege
      @RiyastCollege  หลายเดือนก่อน

      Add multiple ids tokens. For sending notifications to multiple devices this is code you can rest it.

  • @md.nomanparvej6604
    @md.nomanparvej6604 4 วันที่ผ่านมา +1

    Safari browser Support FCM Generate Token and Push Notifications ?

    • @RiyastCollege
      @RiyastCollege  4 วันที่ผ่านมา

      Safari browser does not natively support Firebase Cloud Messaging (FCM) for push notifications. FCM is primarily designed for Android, iOS, and web browsers like Chrome and Firefox. For Safari push notifications, you can use Apple Push Notification Service (APNs). Let me know if you’d like more details!

    • @RiyastCollege
      @RiyastCollege  4 วันที่ผ่านมา

      Please see this video for APN.
      th-cam.com/video/0QOGfqBpy4I/w-d-xo.html

  • @abdullahshahid6637
    @abdullahshahid6637 หลายเดือนก่อน +2

    How to change iOS push notification sound programmatically ?

    • @RiyastCollege
      @RiyastCollege  หลายเดือนก่อน +1

      Also, send the sound file URL from the backend to the Firebase notification array in a new parameter named "sound", and include the URL in this parameter. Then, retrieve the sound URL from the Firebase event and play the sound. Ensure the file format is supported by iOS, such as .caf, .aiff, or .wav.

    • @abdullahshahid6637
      @abdullahshahid6637 หลายเดือนก่อน +1

      @@RiyastCollege is it possible through firebase console?

    • @RiyastCollege
      @RiyastCollege  หลายเดือนก่อน

      @@abdullahshahid6637 Yes this possible using Firebase console.