src/HtmlBuilder.php
public function script(string $url, array $attributes = [], ?bool $secure = null): Htmlable
    {
        $attributes['src'] = $this->url->asset($url, $secure);

        return $this->toHtmlString('<script'.$this->attributes($attributes).'></script>');
    }
public function script(string $url, array $attributes = [], ?bool $secure = null): Htmlable
    {
        $attributes['src'] = $this->url->asset($url, $secure);

        return $this->toHtmlString('<script'.$this->attributes($attributes).'></script>');
    }
Generate a link to a JavaScript file.

@param  string  $url
@param  array  $attributes
@param  bool|null  $secure

@return \Illuminate\Contracts\Support\Htmlable