Use App::abort instead of Response::make
This commit is contained in:
parent
cf36bb47c2
commit
23cc411ce1
|
@ -37,10 +37,7 @@
|
||||||
{
|
{
|
||||||
if (Auth::guest())
|
if (Auth::guest())
|
||||||
{
|
{
|
||||||
if (Request::ajax())
|
if (Request::ajax()) App::abort(401);
|
||||||
{
|
|
||||||
return Response::make('', 401, array('HTTP/1.1 401 Unauthorized'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return Redirect::guest('login');
|
return Redirect::guest('login');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue