Implemented routing for law show

This commit is contained in:
Kevin Frantz
2018-10-04 20:48:12 +02:00
parent 65c4aea7c8
commit 379e9c62e9
3 changed files with 38 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ namespace App\Controller;
use App\Entity\EntityInterface;
use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\RedirectResponse;
/**
*
@@ -32,4 +33,11 @@ abstract class AbstractEntityController extends FOSRestController
}
return $entity;
}
protected function redirectToRouteById(string $route, int $id): RedirectResponse
{
return $this->redirectToRoute($route, [
'id' => $id
]);
}
}