Merge pull request #662 from cuneytsenturk/master
Redirect to current URL if session timeout
This commit is contained in:
commit
c79ad5a99e
@ -56,6 +56,9 @@ class Handler extends ExceptionHandler
|
|||||||
*/
|
*/
|
||||||
protected function unauthenticated($request, AuthenticationException $exception)
|
protected function unauthenticated($request, AuthenticationException $exception)
|
||||||
{
|
{
|
||||||
|
// Store the current uri in the session
|
||||||
|
session(['url.intended' => $request->url()]);
|
||||||
|
|
||||||
if ($request->expectsJson()) {
|
if ($request->expectsJson()) {
|
||||||
return response()->json(['error' => 'Unauthenticated.'], 401);
|
return response()->json(['error' => 'Unauthenticated.'], 401);
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ class Login extends Controller
|
|||||||
return redirect('wizard');
|
return redirect('wizard');
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect('/');
|
return redirect()->intended('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function destroy()
|
public function destroy()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user