Open zmon opened 5 years ago
The above example is a search for items with 'an' sorted by City in descending order.
The front end would do a GET with a URL of
.../clients?page=1&keyword=an&column=city&direction=1
And return
{ "current_page":1, "data":[ { "id":3, "name":"Maybell Daniel", "address_line_1":"357 Wolff Via Apt. 414", "city":"West Lillastad", "state":"Hawaii" }, { "id":37, "name":"Ms. Callie Shanahan", "address_line_1":"3010 Cummings Mall", "city":"South Robinchester", "state":"New Jersey" }, . . . ], "first_page_url":"https:\/clients?page=1", "from":1, "last_page":3, "last_page_url":"https:\/...clients?page=3", "next_page_url":"https:\/...clients?page=2", "path":"https:\/....clients", "per_page":10, "prev_page_url":null, "to":10, "total":22 }
URLs are not correct. We could change the first, last, next, prev _page_url to just be page numbers.
The above example is a search for items with 'an' sorted by City in descending order.
The front end would do a GET with a URL of
And return
URLs are not correct. We could change the first, last, next, prev _page_url to just be page numbers.