Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/951ddb050c7c27b735d0a365e26742d0 to your computer and use it in GitHub Desktop.
Save parzibyte/951ddb050c7c27b735d0a365e26742d0 to your computer and use it in GitHub Desktop.
<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
# El nombre de la clase debe coincidir con el nombre del archivo .php
class HolaController
{
public function hola()
{
return new Response(
'<html><body>Hola mundo desde <strong>Symfony</strong><br>parzibyte.me</body></html>'
);
}
/**
* @Route("/anotaciones", name="probar_anotaciones")
*/
public function anotaciones(){
return new Response(
'<html><body>Ahora usamos las anotaciones</body></html>'
);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment