Giter Site home page Giter Site logo

Comments (7)

Edujugon avatar Edujugon commented on July 16, 2024 1

Hi @pouriabagheri ,

I'm working on that feature you requested. It's already available in dev branch.

Could you give it a try and let me know?

This is an example about how use it:

$push = new PushNotification('fcm');
$response = $push->setMessage(['message'=>'Hello World'])
            ->setApiKey('YOUR-API-KEY')
            ->setConfig(['dry_run' => false])
            ->sendByTopic('dogs')
            ->getFeedback();

or with a condition:

$push = new PushNotification('fcm');
$response = $push->setMessage(['message'=>'Hello World'])
            ->setApiKey('YOUR-API-KEY')
            ->setConfig(['dry_run' => false])
            ->sendByTopic("'dogs' in topics || 'cats' in topics",true)
            ->getFeedback();

from pushnotification.

Edujugon avatar Edujugon commented on July 16, 2024 1

Hi @pouriabagheri ,

The las version (v2.2.0) has been already released and supports the feature you requested.

Enjoy :)

from pushnotification.

pouriabagheri avatar pouriabagheri commented on July 16, 2024 1

@Edujugon thank you for the great work.

from pushnotification.

Edujugon avatar Edujugon commented on July 16, 2024

Hi @pouriabagheri ,
Could you provide more data and an example so that I can see if it could be added in further releases?

from pushnotification.

pouriabagheri avatar pouriabagheri commented on July 16, 2024

Hi @Edujugon here is a link to FCM doc. I am looking for a way to send messages to users who are subscribed to a topic. instead of sending to individual devices. to my knowledge the current library is assuming there is always a need for device token. but with topic approach we don't include FCM token of the device. just the topic.
thanks

from pushnotification.

pouriabagheri avatar pouriabagheri commented on July 16, 2024

Thanks this would be very handy.

from pushnotification.

Edujugon avatar Edujugon commented on July 16, 2024

@pouriabagheri did you try it?
I'll add this new feature to the new release. Hopefully today :)

from pushnotification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.