如何将推送到PHP功能上的特定Devicetoken



我正在使用离子框架V1。我已经通过Postman使用的推动通知而且我已经将所有DeviceTokens保存在我的DB中,但是我坚持使用PHP功能中的特定设备的任何推动。

curl -X POST -H "Authorization: Bearer API_TOKEN" -H "Content-Type: application/json" -d '{
"tokens": ["DEV_DEVICE_TOKEN"],
"profile": "PROFILE_NAME",
"notification": {
    "message": "This is my demo push!"
}

示例:

public function confirmAction($request){
    $action = $this->find($request->idtblAction);
    $action->idtblStatus=1;
    if($action->save()){
   //I need to send notification in this part
        return Response::json(array('success'=>'true'));
    }else{
        return Response::json(array('success'=>'false'));
    }
}

ionic io使用携带者钥匙和profileApp有什么想法吗?

我已经在不使用PHP的情况下解决了此问题。我通过内部离子应用程序代码做到了。谢谢大家!

最新更新