To create simple Rest API I have followed below steps
downloaded CodeIgniter-restserver
and copy pasted REST_Controller from downloaded file into libraries under my project(src is the project name).
And then created Api.php inside controller of my project
<?php
require(APPPATH'.libraries/REST_Controller.php');
class API extends REST_Controller {
function test()
{
echo "RESTfull API";
}
}
?>
And I run the URLhttp://localhost/src/index.php/Api/test in postman but it is not showing results.