Ezequiel Falduto

Results comments of Ezequiel Falduto

Oh, i see. I need to define a route like this $route['api/usuarios/(:any)'] = 'api/usuarios/index_get/$1 to make it work right? Sorry, i thought the library was doing it on background. Thanks!...

Just tried, but didn't work: // Routes $route['api/usuarios/(:any)'] = 'api/usuarios/index_get/$1'; // Controller /application/controllers/api/usuarios.php class Usuarios extends REST_Controller { public function index_get($id) { [....] } } // Browser URL: http://local.xxxxx.com/api/usuarios/439 //...

I made it simpler, here is my controller: // Controller: /application/controllers/api/usuarios.php require_once APPPATH . 'libraries/REST_Controller.php'; class Usuarios extends REST_Controller { public function index_get($id = null) { var_dump($id);exit; } } //...

I solved it. The route was wrong, it should be: $route['usuarios/(:any)'] = 'usuarios/index/$1'; Because index is the "resource". Thanks @chriskacerguis ! =)