public function scriptWithCallback(array $captchas, $callbackName = 'captchaRenderCallback')
    {
        $script = $this->script($callbackName)->toHtml();

        if ( ! empty($script) && ! empty($captchas)) {
            $script = implode(PHP_EOL, [
                $this->getApiScript()->toHtml(),
                '<script>',
                    "var $callbackName = function() {",
                        $this->renderCaptchas($captchas),
                    '};',
                '</script>',
                $script,
            ]);
        }

        return $this->toHtmlString($script);
    }
public function scriptWithCallback(array $captchas, $callbackName = 'captchaRenderCallback')
    {
        $script = $this->script($callbackName)->toHtml();

        if ( ! empty($script) && ! empty($captchas)) {
            $script = implode(PHP_EOL, [
                $this->getApiScript()->toHtml(),
                '<script>',
                    "var $callbackName = function() {",
                        $this->renderCaptchas($captchas),
                    '};',
                '</script>',
                $script,
            ]);
        }

        return $this->toHtmlString($script);
    }
public function scriptWithCallback ( array $ captchas , $ callbackName = 'captchaRenderCallback' ) { $ script = $ this -> script ( $ callbackName ) -> toHtml ( ) ; if ( ! empty ( $ script ) && ! empty ( $ captchas ) ) { $ script = implode ( PHP_EOL , [ $ this -> getApiScript ( ) -> toHtml ( ) , '<script>' , "var $callbackName = function() {" , $ this -> renderCaptchas ( $ captchas ) , '};' , '</script>' , $ script , ] ) ; } return $ this -> toHtmlString ( $ script ) ; }
Get script tag with a callback function.

@param  array   $captchas
@param  string  $callbackName

@return \Illuminate\Support\HtmlString
Get script tag with a callback function .