DRY up path (#5173)

This commit is contained in:
Taylor Otwell
2019-12-10 08:59:27 -06:00
committed by GitHub
parent f4b1dc6df0
commit 972f3cd283
7 changed files with 19 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Support\Facades\Auth;
@@ -18,7 +19,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
return redirect(RouteServiceProvider::HOME);
}
return $next($request);