1
I’m developing a system integration, and I’m using Slim Framework I’m using an Action called Cron <- was created by min.
Cron has a method called checkComplited
private function verificarComplited($id, $status = 0){
try
{
$complited = $this->db->prepare("select * from completed where id = :id");
$complited->bindParam("id", $id);
$complited->execute();
if ($complited->rowCount() > 0) {
return true;
}else{
$moduloCompleted = $complited->fetchAll(\PDO::FETCH_OBJ);
$json = json_encode($moduloCompleted);
$app->post('http://localhost:8888/', function ($json) use ($app){
});
}
}
catch (PDOException $e)
{
echo "erro ao adicionar usuario tabela mdl_user_enrolments";
return "erro ao adicionar usuario tabela mdl_user_enrolments";
}
}
I need to submit $json to a url outside of my project as I can do this ?
$app->post
is what?– novic
it’s not working, would you give me a tip ?
– Matheus Freitas
the context for solution is greater so you need to put in your whole question, to try to help! only with this excerpt becomes complicated.
– novic
Okay, I’ll try to make it clear.
– Matheus Freitas