REST API, is CI for me? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Choosing CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=8) +--- Thread: REST API, is CI for me? (/showthread.php?tid=75452) |
REST API, is CI for me? - dee-u - 02-07-2020 Just came across CodeIgniter this morning and I am intrigued by it, I am wondering if I could use it to "improve" upon my manual coding of php "REST" functions like the following? PHP Code: <?php I am calling it in a mobile app using ajax: Code: function addToCart($menuID, $price, $clientID) From my initial understanding, CI seems to be a "complete" package where I could create my "frontend" and "backend", is that correct? Could I not use it for "backend" purposes only? Like exposing a "Web Service" or "REST" API that I could call either in mobile or a "web" application? TIA RE: REST API, is CI for me? - donpwinston - 02-07-2020 Good grief, yes! (to both questions) RE: REST API, is CI for me? - jreklund - 02-08-2020 Yes, you don't need to have a front-end. It could just be an API. I would suggest that you have a go with CodeIgniter 4 RC4, as it provides a nice way of building RESTful routes. https://codeigniter4.github.io/userguide/incoming/restful.html RE: REST API, is CI for me? - dee-u - 02-08-2020 Thank you guys, I need to wrap my head on this, looks like there is a learning curve involved as of now. Are there any downloadable sample projects out there? RE: REST API, is CI for me? - InsiteFX - 02-08-2020 Lonnie has lots of sample projects one of them is a CI 4 Myth::Auth You can find his projects here: Lonnie's GitHub |