Merge branch 'master' of https://github.com/bagisto/bagisto into development

This commit is contained in:
Prashant Singh 2019-02-12 14:57:12 +05:30
commit 5ea84dff76
1 changed files with 8 additions and 1 deletions

View File

@ -45,7 +45,14 @@ class SessionController extends Controller
if (auth()->guard('admin')->check()) {
return redirect()->route('admin.dashboard.index');
} else {
session()->put('url.intended', url()->previous());
if (strpos(url()->previous(), 'admin') !== false) {
$intendedUrl = url()->previous();
} else {
$intendedUrl = route('admin.dashboard.index');
}
session()->put('url.intended', $intendedUrl);
return view($this->_config['view']);
}
}