private static function extractAttributesFromRoutes($url, $routes)
    {
        $attributes = [];

        foreach ($routes as $route) {
            /**
             * @var  \Illuminate\Routing\Route  $route
             * @var  \Illuminate\Http\Request   $request
             */
            $request = Request::create(implode('/', $url));

            if ( ! $route->matches($request))
                continue;

            $match = self::hasAttributesFromUriPath($url, $route->uri(), $attributes);

            if ($match)
                break;
        }

        return $attributes;
    }
private static function extractAttributesFromRoutes($url, $routes)
    {
        $attributes = [];

        foreach ($routes as $route) {
            /**
             * @var  \Illuminate\Routing\Route  $route
             * @var  \Illuminate\Http\Request   $request
             */
            $request = Request::create(implode('/', $url));

            if ( ! $route->matches($request))
                continue;

            $match = self::hasAttributesFromUriPath($url, $route->uri(), $attributes);

            if ($match)
                break;
        }

        return $attributes;
    }
private static function extractAttributesFromRoutes ( $ url , $ routes ) { $ attributes = [ ] ; foreach ( $ routes as $ route ) { /**
             * @var  \Illuminate\Routing\Route  $route
             * @var  \Illuminate\Http\Request   $request
             */ $ request = Request :: create ( implode ( '/' , $ url ) ) ; if ( ! $ route -> matches ( $ request ) ) continue ; $ match = self :: hasAttributesFromUriPath ( $ url , $ route -> uri ( ) , $ attributes ) ; if ( $ match ) break ; } return $ attributes ; }
Extract attributes from routes.

@param  array                                $url
@param  \Illuminate\Routing\RouteCollection  $routes

@return array
Extract attributes from routes .