original_string: public function render($namespace = 'config')
      {
          foreach ($this->variables as $key => $variable) {
              if ($variable instanceof Closure) {
                  $variable = $variable();
  
                  if (is_array($variable)) {
                      $this->add($variable);
                  }
              }
          }
  
          $variables = array_filter($this->variables, function ($variable) {
              return !$variable instanceof Closure;
          });
  
          return new HtmlString(
              '<script>window.'.$namespace.' = '.json_encode($variables).';</script>'
          );
      }
code: public function render($namespace = 'config')
      {
          foreach ($this->variables as $key => $variable) {
              if ($variable instanceof Closure) {
                  $variable = $variable();
  
                  if (is_array($variable)) {
                      $this->add($variable);
                  }
              }
          }
  
          $variables = array_filter($this->variables, function ($variable) {
              return !$variable instanceof Closure;
          });
  
          return new HtmlString(
              '<script>window.'.$namespace.' = '.json_encode($variables).';</script>'
          );
      }
code_tokens: public function render ( $ namespace = 'config' ) { foreach ( $ this -> variables as $ key => $ variable ) { if ( $ variable instanceof Closure ) { $ variable = $ variable ( ) ; if ( is_array ( $ variable ) ) { $ this -> add ( $ variable ) ; } } } $ variables = array_filter ( $ this -> variables , function ( $ variable ) { return ! $ variable instanceof Closure ; } ) ; return new HtmlString ( '<script>window.' . $ namespace . ' = ' . json_encode ( $ variables ) . ';</script>' ) ; }
docstring: Render as a HTML string.
  
  @param string $namespace
  
  @return \Illuminate\Support\HtmlString
docstring_tokens: Render as a HTML string .