<?php return array('before' => function () { // Do stuff before every request to your application. Asset::add('bootsrap', 'css/bootstrap.min.css'); Asset::add('mycss', 'css/my.css'); Asset::add('jquery', 'js/jquery.js'); }, 'after' => function ($response) { // Do stuff after every request to your application. }, 'auth' => function () { if (Auth::guest()) { return Redirect::to_login(); } }, 'csrf' => function () { if (Request::forged()) { return Response::error('500'); } });
<?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; });