Skip to content

Commit

Permalink
code challenge 2 solution
Browse files Browse the repository at this point in the history
  • Loading branch information
jschaedl committed Sep 26, 2023
1 parent efe245d commit 89d9a2b
Show file tree
Hide file tree
Showing 20 changed files with 696 additions and 304 deletions.
14 changes: 14 additions & 0 deletions CODING-CHALLENGE-3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# RESTful Webservices in Symfony

## Coding Challenge 3 - Pagination

### Tasks

- add pagination to your workshop and attendee list actions using a `page` and `size` query parameter

### Solution

- introduce query params `page` and `size` in your ListControllers
- use the Doctrine Paginator to paginate the workshop and attendee lists
- implement a `PaginatedCollection` object and add the properties `items`, `total` and `count`
- implement a `PaginatedCollectionFactory` to encapsulate your pagination logic
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@
"doctrine/doctrine-bundle": "^2.10",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.16",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.24",
"ramsey/uuid": "*",
"ramsey/uuid-doctrine": "^2.0",
"symfony/console": "6.3.*",
"symfony/dotenv": "6.3.*",
"symfony/flex": "^2",
"symfony/framework-bundle": "6.3.*",
"symfony/property-access": "6.3.*",
"symfony/property-info": "6.3.*",
"symfony/runtime": "6.3.*",
"symfony/serializer": "6.3.*",
"symfony/yaml": "6.3.*",
"webmozart/assert": "^1.11"
},
Expand Down
Loading

0 comments on commit 89d9a2b

Please sign in to comment.