After trying to create a delete method, I am experiencing the following error:

```
An exception has been thrown during the rendering of a template ("Some mandatory parameters are missing ("id") to generate a URL for route "movie_delete".") in movies/index.html.twig at line 10.

```

The code I am using:
Twig template:

```
{% extends 'base.html.twig' %}

{% block body %}
    {% if movies|length == 0 %}
        There are no movie items available. Add a movie <a href="{{ path('movie_create_form') }}">here</a> to get started.
    {% elseif movies|length != 0 %}
        These are the results: <br />
        <ul>
            {% for x in movies %}
                <li>Title: {{ x.title }}  - Price: {{ x.price }} - <a href="#">Edit</a> - <a href="{{ path('movie_delete') }}{{ x.id }}"> Delete</a></li>
            {% endfor %}
        </ul>
        <a href="{{ path('movie_create_form') }}">Add more movie entries</a>
    {% endif %}
{% endblock %}

```

Delete class:

```
<?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;

use AppBundle\Entity\Movie;

class MovieDeleteController extends Controller
{

    public function deleteAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        if(!$id)
        {
            throw $this->createNotFoundException('No ID found');
        }

        $movie = $this->getDoctrine()->getEntityManager()->getRepository('AppBundle:Movie')->Find($id);

        if($movie != null)
        {
            $em->remove($movie);
            $em->flush();
        }

        return $this->redirectToRoute('movies');
    }
}

```

And my routing.yml:

```
movie_delete:
    path:     /movies/delete/{id}
    defaults: { _controller: AppBundle:MovieDelete:delete }

```

Can anyone explain me how I should add a Delete method in Symfony so that I can apply the change in the above written code?