Commit 3f321b9d authored by Mat's avatar Mat

Brasserie, putAction

parent e8defcd0
...@@ -5,6 +5,7 @@ namespace Api2Bundle\Controller; ...@@ -5,6 +5,7 @@ namespace Api2Bundle\Controller;
use Api2Bundle\Entity\Brasserie; use Api2Bundle\Entity\Brasserie;
use FOS\RestBundle\Controller\Annotations as Rest; use FOS\RestBundle\Controller\Annotations as Rest;
use FOS\RestBundle\Controller\FOSRestController; use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\Request;
class BrasserieController extends FOSRestController class BrasserieController extends FOSRestController
{ {
...@@ -19,4 +20,17 @@ class BrasserieController extends FOSRestController ...@@ -19,4 +20,17 @@ class BrasserieController extends FOSRestController
->getRepository(Brasserie::class) ->getRepository(Brasserie::class)
->findAll(); ->findAll();
} }
/**
* @param Request $request
* @param $id
* @Rest\Put(path="/brasserie/{id}")
* @Rest\View()
*/
public function putAction(Request $request, Brasserie $id)
{
// le fait de typer $id fait qu'il retourne un objet !
dump($id); die;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment