Create Three Symfony Back Ends - Part #37 - GET multiple resources in API Platform

preview_player
Показать описание
We are now well on our way with our customised API Platform implementation. We are following along with the same Behat test suite that we used for our standalone Symfony 4 JSON API, and our Symfony 4 with FOSRESTBundle implementations. So far, things are looking pretty good - and with quite a lot less effort on our part.

Previously we covered the GET operation for a single Album - e.g. /album/3.

Now we want to get back a list of all Album resources in our system. This would be a Collection Operation.

We've already defined this route. We had to. In API Platform, both GET operations are mandatory, and we had to define a custom collectionOperation option in order to get our POST test to pass.
Рекомендации по теме
Комментарии
Автор

Can you explain to us knp paginator in rest api ?

milanradusin
visit shbcf.ru