Skip to content

Commit

Permalink
fixed #220
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Mar 6, 2018
1 parent 71e5c80 commit df9ade4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/Http/Controllers/Auth/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ public function store()

// Check if is 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('/');
Expand Down

0 comments on commit df9ade4

Please sign in to comment.