Skip to content

Commit da18285

Browse files
authored
Merge pull request #643 from maxhelias/patch-1
Fix typo bookService by bookRepository
2 parents 5a6f053 + df90dd1 commit da18285

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/pagination.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,17 +416,17 @@ The Controller would look like this:
416416
namespace App\Controller\Book;
417417
418418
use ApiPlatform\Core\Bridge\Doctrine\Orm\Paginator;
419-
use App\Service\Book\BookService;
419+
use App\Repository\BookRepository;
420420
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
421421
use Symfony\Component\HttpFoundation\Request;
422422
423423
class GetBooksByFavoriteAuthorAction extends AbstractController
424424
{
425-
public function __invoke(Request $request, BookService $bookService): Paginator
425+
public function __invoke(Request $request, BookRepository $bookRepository): Paginator
426426
{
427427
$page = (int) $request->query->get('page', 1);
428428
429-
return $bookService->getBooksByFavoriteAuthor($page);
429+
return $bookRepository->getBooksByFavoriteAuthor($page);
430430
}
431431
}
432432
```

0 commit comments

Comments
 (0)