filmov
tv
Create Three Symfony Back Ends - Part #38 - PUT to Update in API Platform

Показать описание
At this point in our API Platform implementation we can GET a single Album, we can GET a collection of Albums, and we can POST in new Album data to create new resources. It would be super useful if we could update existing Albums, too.
As a heads up, in the Symfony 4 JSON API, and Symfony 4 FOSRESTBundle implementations we implemented PUT and PATCH. The API Platform implementation will by-pass PATCH. However, PATCH is supported, and is automatically configured (if not customising item operations) when using raw JSON.
Anyway, let's implement PUT.
As a heads up, in the Symfony 4 JSON API, and Symfony 4 FOSRESTBundle implementations we implemented PUT and PATCH. The API Platform implementation will by-pass PATCH. However, PATCH is supported, and is automatically configured (if not customising item operations) when using raw JSON.
Anyway, let's implement PUT.