Skip to content

Commit 92ed3a4

Browse files
authored
Fix UrlGenerator class_exists on interface (#30)
1 parent dc19309 commit 92ed3a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class UrlGenerator extends BaseUrlGenerator
2020
*/
2121
public function __construct($routes, Request $request, $assetRoot = null)
2222
{
23-
if (!$routes instanceof RouteCollection && !(class_exists('Illuminate\Routing\RouteCollectionInterface') && is_subclass_of($routes, 'Illuminate\Routing\RouteCollectionInterface'))) {
23+
if (!$routes instanceof RouteCollection && !(interface_exists('\Illuminate\Routing\RouteCollectionInterface') && is_subclass_of($routes, '\Illuminate\Routing\RouteCollectionInterface'))) {
2424
throw new \InvalidArgumentException('The $routes parameter has to be of type RouteCollection or RouteCollectionInterface for L6+.');
2525
}
2626

0 commit comments

Comments
 (0)