laravel-fcm-notification icon indicating copy to clipboard operation
laravel-fcm-notification copied to clipboard

Supporting multiple api keys for multiple apps

Open bar2 opened this issue 5 years ago • 4 comments

Hey,

Current implementation resolves fcm channel with the fcm key from the services config, which, at least within my knowledge with the framework, stops me from setting a custom api key (or an alias for that api key for that matter) for a specific notification.

What would be the best way to achieve supporting multiple api keys within a single laravel project?

bar2 avatar Aug 16 '20 12:08 bar2

That functionality currently doesn't exist with this package.

benwilkins avatar Aug 17 '20 14:08 benwilkins

Any suggestions on a how-to?

bar2 avatar Aug 22 '20 16:08 bar2

If you store your key into services config, you can do this before creating the fcm instance (maybe in the notification constructor)

config(['services.fcm.key' => "NEW_KEY"]);

AlsonicTech avatar Oct 26 '21 03:10 AlsonicTech

https://github.com/ankurk91/fcm-notification-channel

ankurk91 avatar Feb 18 '22 15:02 ankurk91