本文整理汇总了PHP中Illuminate\Html\HtmlBuilder::script方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlBuilder::script方法的具体用法?PHP HtmlBuilder::script怎么用?PHP HtmlBuilder::script使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Html\HtmlBuilder
的用法示例。
在下文中一共展示了HtmlBuilder::script方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: script
public function script($url, $attributes = array(), $secure = null)
{
if ($this->url->isValidUrl($url) or !$this->app->environment('sae')) {
return parent::script($url, $attributes, $secure);
} else {
$attributes['src'] = $this->patchUrl($url, $secure, 'script');
return '<script' . $this->attributes($attributes) . '></script>' . PHP_EOL;
}
}
示例2: script
/**
* Generate a link to a JavaScript file.
*
* @param string $url
* @param array $attributes
* @param bool $secure
* @return string
* @static
*/
public static function script($url, $attributes = array(), $secure = null)
{
return \Illuminate\Html\HtmlBuilder::script($url, $attributes, $secure);
}
示例3: script
/**
* Generate a link to a JavaScript file.
*
* @param string $url
* @param array $attributes
* @param bool $secure
* @param bool $enablePrefix
* @return string
*/
public function script($url, $attributes = array(), $secure = null, $enablePrefix = true)
{
return parent::script(($enablePrefix ? $this->prefix : null) . $url, $attributes, $secure);
}
示例4: script
/**
* Generate a link to a JavaScript file.
*
* @param string $url
* @param array $attributes
* @param bool $secure
* @return \Illuminate\Support\HtmlString
*/
public function script($url, $attributes = array(), $secure = null)
{
return new HtmlString(parent::script($url, $attributes, $secure));
}
示例5: script
/**
* Generate a link to a JavaScript file.
*
* @param string $url
* @param array $attributes
* @return string
* @static
*/
public static function script($url, $attributes = array())
{
return \Illuminate\Html\HtmlBuilder::script($url, $attributes);
}
示例6: scriptBust
/**
* @param $url
* @param array $attributes
* @param null $secure
* @param bool $force
* @return string
*/
public function scriptBust($url, $attributes = array(), $secure = null, $overrideConfig = true)
{
return parent::script($this->tryBuildBustableUrl($url, $overrideConfig), $attributes, $secure);
}