Skip to content

Can't get Laravel pagination to work #50

@pandongo

Description

@pandongo

Hi

I am trying to handle simple pagination between my API and client.
When looking at Cristal\ApiWrapper\Builder::class. the expected pagination contants seems to follow laravel standard. However, the page parameter is not passed to the API request.

What am I missing?

Client

$result = BookAPI::paginate(10);

Then in my view:

$result ->links()

API

$books= Book::paginate(10); return response()->json($books, 200);

First 10 results are showing as expected and the pagination is shown. When clicking to next page the URL parameter updates on the client view, but it is not passed to the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions