private function onMethodNotAllowedHttpException(GetResponseForExceptionEvent $event) { $response = new RedirectResponse('/'); $event->setResponse($response); }