<?php Entrust::routeNeedsRoleOrPermission('admin*', array('Admin'), [], Redirect::to('/')); /* |-------------------------------------------------------------------------- | Application & Route Filters |-------------------------------------------------------------------------- | | Below you will find the "before" and "after" events for the application | which may be used to do any work before or after a request into your | application. Here you may also register your custom route filters. | */ App::before(function ($request) { }); App::after(function ($request, $response) { }); /* |-------------------------------------------------------------------------- | Site Protection |-------------------------------------------------------------------------- */ Route::filter('siteprotection', function () { if (Cookie::has('siteprotection') == false) { return View::make('site.pages.site-login'); } }); /* |-------------------------------------------------------------------------- | Authentication Filters |--------------------------------------------------------------------------