2016-12-10 52 views

回答

0

首先查看關於CSRF的燃料配置

'csrf_autoload_methods' => array('post', 'put', 'delete'), 

那麼你應該使用restcontroller

class Controller_Test extends Controller_Rest 
{ 

    public function get_list() 
    { 
     return $this->response(array(
      'foo' => Input::get('foo'), 
      'baz' => array(
       1, 50, 219 
      ), 
      'empty' => null 
     )); 
    } 
} 
相關問題