public static function parseUriFromBladeExpression($expr)
    {
        if (is_null($expr)) {
            // Return the current route if no argument is given.
            return app('router')->current()->getUri();
        }

        $expr = trim($expr, '()\'" ');

        if ($expr !== '/') {
            // Remove leading slash, if any.
            return ltrim($expr, '/');
        }

        return $expr;
    }
public static function parseUriFromBladeExpression($expr)
    {
        if (is_null($expr)) {
            // Return the current route if no argument is given.
            return app('router')->current()->getUri();
        }

        $expr = trim($expr, '()\'" ');

        if ($expr !== '/') {
            // Remove leading slash, if any.
            return ltrim($expr, '/');
        }

        return $expr;
    }
public static function parseUriFromBladeExpression ( $ expr ) { if ( is_null ( $ expr ) ) { // Return the current route if no argument is given. return app ( 'router' ) -> current ( ) -> getUri ( ) ; } $ expr = trim ( $ expr , '()\'" ' ) ; if ( $ expr !== '/' ) { // Remove leading slash, if any. return ltrim ( $ expr , '/' ) ; } return $ expr ; }
Parse the URI from the Blade directive expression.

@param  string $expr

@return string
Parse the URI from the Blade directive expression .