i want to use fullcalendar.io with my Symfony2 project. The Fullcalendar sends such requests for getting Event data:
/myfeed.php?start=2013-12-01&end=2014-01-12&_=1386054751381
Symfony2 usally routes with Slashes in the URl, it only exists this route:
/myfeed/start=2013-12-01/end=2014-01-12/_=1386054751381
How can I use the Feature of Fullcalendar for Symfony2?
Here my Test-Controller:
<?php
namespace Chris\KfzBuchungBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
class AjaxGetWeekController extends Controller
{
public function indexAction(Request $request, $start)
{
$response = new Response(json_encode(array("title" => 'blub',"start" =>$start)));
$response->headers->set('Content-Type', 'application/json');
return $response;
}
}
Thank you!