I am having problems setting up an RESTful API with Kohana 3.3. I have added the following module (branch 3.3/release/v2.0), https://github.com/michal-m/kohana-modules-restful, to my bootstrap.
Kohana::modules(array(
'restful' => MODPATH.'restful'
));
I've created a new controller, Controller_Api
which extends RESTful_Controller
and has get
, update
, create
, delete
actions. In my routes file I have:
Route::set('api', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'api',
'action' => 'index'
));
But the problem I'm having is when I go to: http://example.com/api/user/1
I get the following error which indicates my route is wrong but I can't work it out:
Kohana_HTTP_Exception [ 404 ]: Unable to find a route to match the URI: api/user/1