Skip to content

Instantly share code, notes, and snippets.

@khlbrg
Last active January 3, 2016 08:29
Show Gist options
  • Save khlbrg/8436191 to your computer and use it in GitHub Desktop.
Save khlbrg/8436191 to your computer and use it in GitHub Desktop.
Make surf CSRF is checked on eash post request on Laravel Controllers
class BaseController extends Controller {
public function __construct()
{
// CSRF protection for all POST requests
$this->beforeFilter('csrf', array('on' => 'post'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment