0

I have problem with routing. My route looks like this:

Route::set('restapi', 'restapi/<version>(/<directory>)/<controller>(.<format>)', array( 'version' => 'v1', 'format' => '(json|xml|csv|html)', )) ->defaults(array( 'format' => 'json', )); And my question is: how my url should looks like? Path for Api: Controller/restapi/api.php Thanks for help.

R0ck99
  • 113
  • 1
  • 1
  • 7
  • 1
    /restapi/v1/Directory/USER.json Or /restapi/v1/User.json where user is your controller name. – Faraz Oct 11 '16 at 11:58
  • I already solved this. It was problem with htaccess configuration. – R0ck99 Oct 11 '16 at 13:05
  • 1
    It's very strange if you solved your problem through .htaccess. Default Kohana .htaccess shouldn't be changed. Factually routers are necessary for getting beautiful links without changing .htaccess. – ilyatom Oct 14 '16 at 11:24

0 Answers0