Skip to content

Instantly share code, notes, and snippets.

@dunglas
Last active December 10, 2015 06:58
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 dunglas/4398277 to your computer and use it in GitHub Desktop.
Save dunglas/4398277 to your computer and use it in GitHub Desktop.
Controller to load the SPA
<?php
// Part of the Dunglas' Symfony 2 / Chaplin.js tutorial
// http://dunglas.fr/2012/12/utiliser-chaplin-js-et-backbone-js-avec-symfony-2-installation-et-configuration/
namespace Dunglas\ChaplinDemoBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
class DefaultController extends Controller
{
/**
* @Route("/")
* @Template()
*/
public function indexAction()
{
return array();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment