This commit is contained in:
denisdulici 2018-03-06 17:49:27 +03:00
parent 71e5c80296
commit df9ade4ff4

View File

@ -70,7 +70,14 @@ class Login extends Controller
// Check if is customer // Check if is customer
if ($user->customer) { if ($user->customer) {
return redirect()->intended('customers'); $path = session('url.intended', 'customers');
// Path must start with 'customers' prefix
if ($path == env('APP_URL')) {
$path = 'customers';
}
return redirect($path);
} }
return redirect('/'); return redirect('/');