Skip to content

Instantly share code, notes, and snippets.

@alexandrecruz
Last active August 29, 2015 14:08
Show Gist options
  • Save alexandrecruz/3711f2295c92aa0fd873 to your computer and use it in GitHub Desktop.
Save alexandrecruz/3711f2295c92aa0fd873 to your computer and use it in GitHub Desktop.
<?php
class AdminController extends BaseController {
/**
* Controller constructor. Force Token protection,
* and force out-of-filter auth for this
* controller in dashboard page.
*
* @return void
*/
public function __construct() {
$this->beforeFilter('csrf', array('on'=>'post'));
$this->beforeFilter('auth');
$this->beforeFilter('NOME_DO_FILTRO');
}
/* conteudo da classe */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment