Work on 401 response from filter.
This commit is contained in:
parent
d286d94122
commit
c457a93ddb
|
@ -37,10 +37,15 @@
|
|||
{
|
||||
if (Auth::guest())
|
||||
{
|
||||
if (Request::ajax()) App::abort(401);
|
||||
|
||||
if (Request::ajax())
|
||||
{
|
||||
return Response::make('Unauthorized', 401);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect::guest('login');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue