1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-11-24 03:42:32 +01:00

Recall previous route when manually clicking login

This commit is contained in:
Daniel Seiler 2019-12-14 08:16:48 +01:00
parent 02af69ddf2
commit afa501e75b
2 changed files with 5 additions and 1 deletions

View File

@ -128,6 +128,10 @@ class LoginController extends Controller
]);
}
if ($request->has('intended')) {
redirect()->setIntendedUrl($request->get('intended'));
}
return view('auth.login', [
'socialDrivers' => $socialDrivers,
'authMethod' => $authMethod,

View File

@ -45,7 +45,7 @@
@if(setting('registration-enabled', false))
<a href="{{ url('/register') }}">@icon('new-user') {{ trans('auth.sign_up') }}</a>
@endif
<a href="{{ url('/login') }}">@icon('login') {{ trans('auth.log_in') }}</a>
<a href="{{ action('Auth\LoginController@getLogin', ['intended' => url()->current()]) }}">@icon('login') {{ trans('auth.log_in') }}</a>
@endif
</div>
@if(signedInUser())