Efficiently\Larasset\Asset::faviconLinkTag PHP Метод

faviconLinkTag() публичный Метод

Returns a HTML favicon link tag for the source and attributes specified as arguments.
public faviconLinkTag ( string $source = null, array $attributes = [] ) : string
$source string Relative URL
$attributes array HTML attributes
Результат string
    public function faviconLinkTag($source = null, $attributes = [])
    {
        // E.g. favicon_link_tag('favicon.ico', ['rel' => 'shortcut icon']); =>
        //      <link href='http://localhost/assets/favicon.ico' rel="shortcut icon" type="image/vnd.microsoft.icon">
        $source = $source ?: "favicon.ico";
        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];
        $defaults = ['rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon'];
        $attributes = $attributes + $defaults;
        return "<link href='" . $this->assetPath($source, $assetsOptions) . "'" . app('html')->attributes($attributes) . ">" . PHP_EOL;
    }