Skip to content

Instantly share code, notes, and snippets.

@darraghenright
Last active December 14, 2015 15:58
Show Gist options
  • Save darraghenright/5111500 to your computer and use it in GitHub Desktop.
Save darraghenright/5111500 to your computer and use it in GitHub Desktop.
<?php
// omitted namespace declaration and imports for brevity
class HomeController extends Controller
{
/**
* Home page
*
* @Route("/", name="home_index")
* @Secure(roles="ROLE_USER")
* @Method("get")
* @Template()
*/
public function indexAction()
{
return array();
}
/**
* Handle form post
*
* @Route("/", name="home_form")
* @Secure(roles="ROLE_USER")
* @Method("post")
* @Template()
*/
public function handleFormAction()
{
// implement...
return array();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment