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;
    }