【发布时间】:2013-01-29 17:29:29
【问题描述】:
我只想保护对我的索引的 POST 请求,我该怎么做?
public $restful = true;
public function __construct()
{
parent::__construct();
//this does not work
$this->filter('before', 'auth')->only(array('post_index'));
}
public function get_index()
{
//I do not want to protect this
return Response::eloquent(Model::all());
}
public function post_index()
{
//I want to protect only this call
}
【问题讨论】: