add route for creating a person, and post api

This commit is contained in:
2021-05-21 18:05:03 +02:00
parent 857298b8b8
commit ebe3bc5f7b
8 changed files with 246 additions and 19 deletions

View File

@@ -40,6 +40,20 @@ class AbstractCRUDController extends AbstractController
return $e;
}
/**
* Create an entity.
*
* @param string $action
* @param Request $request
* @return object
*/
protected function createEntity(string $action, Request $request): object
{
$type = $this->getEntityClass();
return new $type;
}
/**
* Count the number of entities
*