Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4069

How to change api URL attributes(values) in SLIM

$
0
0

I am doing pagination in REST api developed over slim.Using below API to get current uri

(string) $request->getUri();

RESULT ::http://localhost/slim/test_app/test/public/api/actions/?page=2

But now for next request i need to replace the page number in current url to (+1) ie 3 here and pass in data returned to user like below

{"data":[//data]"next": http://localhost/slim/test_app/test/public/api/actions/?page=3}

What could be the best way to replace the page number ? Do we have any direct api for this,to just replace the attributes ?


Viewing all articles
Browse latest Browse all 4069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>