@@ -37,9 +37,14 @@ Route::filter('auth', function()
{
if (Auth::guest())
- if (Request::ajax()) App::abort(401);
-
- return Redirect::guest('login');
+ if (Request::ajax())
+ {
+ return Response::make('Unauthorized', 401);
+ }
+ else
+ return Redirect::guest('login');
}
});