}); App::missing(function ($exception) { // return Redirect::to('/login'); }); /* |-------------------------------------------------------------------------- | Authentication Filters |-------------------------------------------------------------------------- | | The following filters are used to verify that the user of the current | session is logged into this application. The "basic" filter easily | integrates HTTP Basic authentication for quick, simple checking. | */ Route::filter('auth', function () { if (UserAuthController::guest()) { if (Request::ajax()) { return Response::make('Unauthorized', 401); } else { return Redirect::to('/login'); } } }); // Route::filter('auth.basic', function() // { // return Auth::basic(); // }); /* |-------------------------------------------------------------------------- | Guest Filter |--------------------------------------------------------------------------