dpkajqd31574096
2017-05-05 16:18
浏览 51
已采纳

Slimframework + AngularJS路线

Well, I'm trying to create a web application with Angular 1.6 and SlimFramework 3.3

The problem is when i try to use the slim framework routes.

I've put all the slim functions inside de "/api" folder. It works when I try ex: "localhost/api/" but if i try "localhost/api/user" it says "Object not found"

// API group
$app->group('/', function () {
// User
  $this->get('/user', 'App\Action\painel\HomeAction:index');
});

https://gist.github.com/miorac/28ab8daf84d0c7cedc3101806642c2c6

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanchi6377 2017-05-05 16:22
    已采纳

    Problem solved: I need to rewrite my .htaccess to that sub-routes. What i did is copy my main htaccess into the /api folder

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题