[Bagisto v2.2.0] Redirection to the current page after login
-
Re: How to give page redirection to the current page after login
I've tried
if (auth()->guard('customer')->check()) { return redirect()->route('customer.profile.index'); } else { $intendedUrl = url()->previous(); session()->put('url.intended', $intendedUrl); return view($this->_config['view']); }
but got
Undefined property: Webkul\Shop\Http\Controllers\Customer\SessionController::$_config
error.Does anyone know how should I change
$this->config(['view'])
for the bagisto v2.2.0? -
Hi,
Thank you for connecting with us.
You can simply use the following in place of returning the view:
return redirect()->back();
This will redirect the user to the previous (or current) page.
Best regards,
Webkul Bagisto Team