<?php return array('before' => function ($method, $uri) { // Do stuff before every request to your application. }, 'after' => function ($response, $method, $uri) { // Do stuff after every request to your application. }, 'auth' => function () { return !Auth::check() ? Redirect::to_login() : null; }, 'csrf' => function () { return Input::get('csrf_token') !== Form::raw_token() ? Response::error('500') : null; });