protected function setJavascriptData($key, $value = null)
    {
        if (is_array($key)) {
            JavaScriptFacade::put($key);
        } else {
            JavaScriptFacade::put([$key => $value]);
        }
    }
protected function setJavascriptData($key, $value = null)
    {
        if (is_array($key)) {
            JavaScriptFacade::put($key);
        } else {
            JavaScriptFacade::put([$key => $value]);
        }
    }
protected function setJavascriptData ( $ key , $ value = null ) { if ( is_array ( $ key ) ) { JavaScriptFacade :: put ( $ key ) ; } else { JavaScriptFacade :: put ( [ $ key => $ value ] ) ; } }
Pass data directly to Javascript.

@link https://github.com/laracasts/PHP-Vars-To-Js-Transformer

@param mixed $key
@param mixed $value

@return $this
Pass data directly to Javascript .