I have set up Rest API's in codeigniter which are to be consumed by android app and also the Web app from same codeigniter setup. Below is my folder structure.
Controllers
api
-signupApi
Signup
The signupApi is the actual rest API to be consumed by both android and web app. Signup is my actual signup screen controller where I have a form to be posted with user registration data to the signupApi.
if($_POST){
// call the signupApi here and post the user registration data
}
If there is a signup POST request how do I call the signup API function which is there in the REST API controller and handle the request in the Signup controller. I did research about how to call a function from another controller function but could not get the right solution for me. Can anybody please suggest me how to proceed with it?