Im new using slim framework and Im trying to make a get. It doesn't return anything and it returns a code 200.
$app->get('/noticias',function ()use ($db,$app){
try{
$consulta = $db->prepare("select * from noticias");
$consulta->execute();
$resultados = $consulta->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($resultados);
}catch (Exception $ex){
echo 'We cant show the news';
}
});
When I make a get this is the result
Do you know some tutorials of slim framework??
Thanks