Hello,
I am using laravel-push-notification library to push data towards android devices, it works great!
However, I want to handle the response, so here is my code:
foreach ($collection->pushManager as $push) {
$response = $push->getAdapter()->getResponse();
dd($response);
}
This works, I got this:
Response {#202 ▼
#id: 6874005614076
#cntSuccess: 0
#cntFailure: 1
#cntCanonical: 0
#message: Message {#196 ▶}
#results: array:1 [▶]
#response: array:5 [▶]
}
So now let's say I want to display the id, I tried this: dd($response->id); I got this error: Cannot access protected property ZendService\Google\Gcm\Response::$id
I tried to access it as an array: dd($response['id']); And I got this: Cannot use object of type ZendService\Google\Gcm\Response as array
So, how to access this data?
Thanks
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community