Add more middleware tests

This commit is contained in:
Dane Everitt 2017-11-03 18:16:49 -05:00
parent 133fd17da6
commit 7882250baf
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
13 changed files with 515 additions and 48 deletions

View file

@ -9,7 +9,7 @@ use Illuminate\Auth\AuthManager;
class RedirectIfAuthenticated
{
/**
* @var \Illuminate\Contracts\Auth\Guard
* @var \Illuminate\Auth\AuthManager
*/
private $authManager;
@ -34,7 +34,7 @@ class RedirectIfAuthenticated
public function handle(Request $request, Closure $next, string $guard = null)
{
if ($this->authManager->guard($guard)->check()) {
return redirect(route('index'));
return redirect()->route('index');
}
return $next($request);