filmov
tv
Create Three Symfony Back Ends - Part #23 - Collections in FOSRESTBundle

Показать описание
In the previous video we implemented the getAction. As such, we can now GET a single resource - one Album entity by ID. Now, let's implement the ability to GET multiple Album resources in one API call.
The route we will need here is another GET request, but this time to /album, rather than /album/{id}.
Once again, FOSRESTBundle gives us a convention to follow here. We need to implement the cgetAction - where the c stands for Collection.
As ever, let's start off with the simple method stub.
The route we will need here is another GET request, but this time to /album, rather than /album/{id}.
Once again, FOSRESTBundle gives us a convention to follow here. We need to implement the cgetAction - where the c stands for Collection.
As ever, let's start off with the simple method stub.