M
M
Messi2019-09-02 08:11:25
symfony
Messi, 2019-09-02 08:11:25

How to paginate via a link in Symfony?

Hello! Please tell me how to implement?
There is a products method in the controller, it is available via the route * @Route("/products", name="products")
How can I make it possible to navigate through products/20/0 (these are the first 20 and 0 offset)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2019-09-02
@index0h

@Route("/products/{limit}/{offset}", name="products"), and then pull limit/offset from $request->attributes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question