Answer the question
In order to leave comments, you need to log in
Why doesn't it send data to the server when the array is generated?
Hello. I ran into a problem and I don't understand what is wrong.
I send push by user id. IDs are stored in the database. I select from a DB, I bring in an array.
$pushUsersId = [];
$searchUserspushTable = push_users::whereIn('user_id',$usersId)->get();
foreach($searchUserspushTable as $searchUserpushTable){
$pushUsersId[] = $searchUserpushTable->push_id;
}
$fields = array(
'app_id' => "09439242-d8c7-45e2-a3c5-7caa2f17cf30",
'include_player_ids' => $pushUsersId,
'contents' => $content,
'headings' => $headings
);
$pushUsersId = array('6e6c8648-fcaa-4c25-9ac1-4f64f8484985','5fe0b8c3-7485-4ce2-875d-405fc78b967a');
$fields = array(
'app_id' => "09439242-d8c7-45e2-a3c5-7caa2f17cf30",
'include_player_ids' => $pushUsersId,
'contents' => $content,
'headings' => $headings
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question