I try to execute a command using a Process in a controller function, its works when is executed using the console but not in the controller
public function addInfo(Request $request):JsonResponse{
$data = json_decode($request->getContent());
try{
$process = new Process(['php ../bin/console app:set-info '.$data->info]);
$process->start();
}catch(Throwable $e){
echo $e->getMessage();
}
return new JsonResponse([
'state'=>'succes'
]);
}