开发者

Undefined $input in kohana

So..I've created a controller inside a directory.

application
  - classes
      - controller
          - api
              user.php

and added the following route in my bootstrap

Route::set('with_dir','api/(<controller>(/<action>(/<id>)))')->defaults(array(
    'directory'=>'api',
    'controller'=>'index'
));

I can access my user controller by /api/user, but the problem is that I get the following error.

Undefined property: Controller_Api_User::$input

i开发者_StackOverflow社区n my user controller, I have

$fbid = $this->input->post('fbid');

Why is it happening?


My best bet? You followed a 2.x tut while you use 3.x. Try $this->request->post('fbid');

You can find the api docs here: http://kohanaframework.org/3.2/guide/api

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜