I am familiarizing with RESTful api (CRUD) with AngularJS and Slim PHP framework. I am following this tutorial : http://www.blog.iamaronbarbosa.com/building-a-basic-crud-application-using-angularjs-and-slim-php-framework-part-1/ . And when the application tried to GET data (file: angular-crud/slim/index.php),
function ListCtrl($scope, $http) {
$http.get('api/users').success(function(data) {
$scope.users = data;
});
}
I get the error code stating,
Status Code: HTTP/1.1 404 Not Found
The url to GET the data is : http://localhost/angular-crud/slim/api/users.
EDIT
HOWEVER, if I apply the url as http://localhost/angular-crud/slim/api/index.php/users it returns the data fine. Is it a must to inlude the index.php? if not is there a workaround to retrieve data using with the url http://localhost/angular-crud/slim/api/users ?
I am very new to this area and I apologize if the question is vague. I tried checking the ports and ran tests using RESTClient but ended up empty handed. You expert advice on this matter is highly appreciated :)