In all my fcm notifications, I create an FcmMessage object with the same AndroidConfig and ApnsConfig. It would be nice if I could create a macro that makes it possible to hide that shared code.
return FcmMessage::create()
->default() // macro that sets android and apns config
->...
// Instead of having to duplicate those configs in every notification
return FcmMessage::create()
->...
->setAndroid(
AndroidConfig::create()->...
)->setApns(
ApnsConfig::create()->...
);
In all my fcm notifications, I create an FcmMessage object with the same AndroidConfig and ApnsConfig. It would be nice if I could create a macro that makes it possible to hide that shared code.