@@ 52-58 (lines=7) @@ | ||
49 | * |
|
50 | * @todo: Clean up |
|
51 | */ |
|
52 | if ($e instanceof AuthenticationException) { |
|
53 | if ($request->segment(1) === 'admin') { |
|
54 | return redirect()->guest('admin/login'); |
|
55 | } else { |
|
56 | return redirect()->guest('login'); |
|
57 | } |
|
58 | } |
|
59 | ||
60 | if ($e instanceof HttpException) { |
|
61 | if (!$e->getStatusCode() == 404) { |
|
@@ 147-151 (lines=5) @@ | ||
144 | return response()->json(['error' => 'Unauthenticated.'], 401); |
|
145 | } |
|
146 | ||
147 | if ($request->segment(1) === 'admin') { |
|
148 | return redirect()->guest('admin/login'); |
|
149 | } else { |
|
150 | return redirect()->guest('login'); |
|
151 | } |
|
152 | } |
|
153 | } |
|
154 |