Fixes #2448 - redirect to intended page

This commit is contained in:
snipe 2016-10-29 07:32:48 -07:00
parent fe041b66c6
commit 38b188f6ff
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ class DashboardController extends Controller
return View::make('dashboard')->with('asset_stats', $asset_stats); return View::make('dashboard')->with('asset_stats', $asset_stats);
} else { } else {
// Redirect to the profile page // Redirect to the profile page
return redirect()->route('view-assets'); return redirect()->intended('account/view-assets');
} }
} }
} }

View file

@ -18,7 +18,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null) public function handle($request, Closure $next, $guard = null)
{ {
if (Auth::guard($guard)->check()) { if (Auth::guard($guard)->check()) {
return redirect('/'); return redirect()->intended('/');
} }
return $next($request); return $next($request);