Comments

Rayyspark

Mon 11 Feb, 2019 12:14 am

This question strong small @DHTML...But from experience, I have written REST API Using PHP from scratch and also with the help of Laravel Framework too...Both seems to solve my problems...But I give it to the Framework thing

dhtml

Mon 11 Feb, 2019 07:37 am

I have done all the above too, right now I am trying out laravel passport.

kakvopravi

Mon 11 Feb, 2019 12:24 pm
It you are using a framework like Laravel, all you need do is use api routes instead of web routes, so that responses would automatically be returned via json.

If you are doing it over plain php, you would want to return those responses manually by encoding and decoding/parsing when needed.