public static function extractAttributes($url = false)
    {
        $parse = parse_url($url);
        $path  = isset($parse['path']) ? explode('/', $parse['path']) : [];
        $url   = [];

        foreach ($path as $segment) {
            if ( ! empty($segment)) $url[] = $segment;
        }

        /** @var \Illuminate\Routing\Router $router */
        $router = app('router');

        return self::extractAttributesFromRoutes($url, $router->getRoutes());
    }
public static function extractAttributes($url = false)
    {
        $parse = parse_url($url);
        $path  = isset($parse['path']) ? explode('/', $parse['path']) : [];
        $url   = [];

        foreach ($path as $segment) {
            if ( ! empty($segment)) $url[] = $segment;
        }

        /** @var \Illuminate\Routing\Router $router */
        $router = app('router');

        return self::extractAttributesFromRoutes($url, $router->getRoutes());
    }
public static function extractAttributes ( $ url = false ) { $ parse = parse_url ( $ url ) ; $ path = isset ( $ parse [ 'path' ] ) ? explode ( '/' , $ parse [ 'path' ] ) : [ ] ; $ url = [ ] ; foreach ( $ path as $ segment ) { if ( ! empty ( $ segment ) ) $ url [ ] = $ segment ; } /** @var \Illuminate\Routing\Router $router */ $ router = app ( 'router' ) ; return self :: extractAttributesFromRoutes ( $ url , $ router -> getRoutes ( ) ) ; }
Extract attributes for current url.

@param  bool|false|string  $url

@return array
Extract attributes for current url .