brozot / Laravel-FCM

Laravel-FCM is an easy to use package working with both Laravel and Lumen for sending push notification with Firebase Cloud Messaging (FCM).
MIT License
888 stars 405 forks source link

use FCM to send push notification to two different drivers #107

Open hardikaecor opened 6 years ago

hardikaecor commented 6 years ago

hi,

I have an application from which i need to send and push notification to two different Apps both having different FCM Sender_id and Server_key. How can i configure this as i find no option to provide a driver that i can use which using FCM:sendto() function.

Any help in this regards will be do the needfull.

Thanks, Hardik

mira-thakkar commented 6 years ago

@hardikaecor did you find any solution?

menkaff commented 4 years ago

@hardikaecor @mira-thakkar any solution?

erkanarslan commented 4 years ago

This is still a problem

menkaff commented 4 years ago

I solve it with change config based on notification type

if ($user_type == 'seller') {
            config([
                'fcm.http.server_key' => env('Seller_FCM_SERVER_KEY'),
                'fcm.http.sernder_id' => env('Seller_FCM_SERVER_ID'),
            ]);
        }
erkanarslan commented 4 years ago

In my case, I needed to send to different mobile apps based on client. We have many applications for different clients. We used the same method as @menkaff. We modify FCM parameters in runtime.

shalomahoble commented 6 months ago

I have an application from which i need to send and push notification to two different Apps both having different FCM Sender_id and Server_key. How can i configure this as i find no option to provide a driver that i can use which using FCM:sendto() function.

Any help in this regards will be do the needfull.

Thanks, Hardik

shalomahoble commented 6 months ago

Did you find the solution?