Skip to content

Commit 369fb86

Browse files
authored
Fix issue if $routes comes back as a single Route instance
1 parent 32231a8 commit 369fb86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Middleware/BasicAuthentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private function specificRouteRestrictionExists()
119119
throw new Exception('Error determining current route.');
120120
}
121121

122-
if (count($routes) != 1) {
122+
if (get_class($routes) != \Illuminate\Routing\Route::class && count($routes) != 1) {
123123
$routes = $routes->first();
124124
}
125125

0 commit comments

Comments
 (0)