What is API Platform - API Platform Discovery Training
Before getting into the code, I invite you to discover together what API Platform is and the problems it solves.
What is that ?
API Platform is a framework written in PHP and based on Symfony which allows you to easily and quickly set up a Rest and GraphQL API. It is based for this on the configuration system which will make it possible to transform the models of our application into API resources with the corresponding entry points. It will also automatically generate an OpenAPI documentation which allows to describe the functioning of the API to the people who would like to use it.
Since it uses the Symfony framework it is also very easy to extend the functionality of the tool by creating new services or by using the integrated event system.