A Complete REST API Tutorial |
Hello, is there a fully completed example project or tutorial?
I'm trying to build REST API test in CI4. I've tried the steps described here : https://codeigniter4.github.io/userguide...stful.html But unfortunately when I try to reach controller, it's returning as an empty XML file. What do I missing? I was expecting a JSON file that contains data. I've never worked with APIs before. So I would be happy if you could explain it simply. I've used to following code: (I'm connected to database and I can see the raw data with "print_r") Controller PHP Code: <?php Model PHP Code: <?php Routes PHP Code: $routes->resource('categories'); |
Messages In This Thread |
A Complete REST API Tutorial - by Philos - 09-07-2019, 02:27 PM
RE: A Complete REST API Tutorial - by ciadmin - 09-07-2019, 02:35 PM
RE: A Complete REST API Tutorial - by mintwint - 09-07-2019, 11:31 PM
RE: A Complete REST API Tutorial - by atsanna - 09-08-2019, 01:55 AM
RE: A Complete REST API Tutorial - by myo - 03-25-2020, 03:58 AM
RE: A Complete REST API Tutorial - by monkenWu - 04-10-2020, 04:53 AM
RE: A Complete REST API Tutorial - by anmar_dev - 04-17-2020, 02:24 AM
|