本文整理匯總了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);
}