BuildsHead
trait BuildsHead
Methods
Get the schema factory used to resolve schema callbacks.
Use $exact to render the title without inherited prefix or suffix.
Set the page description.
Set the theme color for the given media.
Set the application name.
Set the supported color schemes.
Set the referrer policy.
Set the viewport metadata.
Set the Apple web app title.
Set whether the page supports web app mode.
Set the Apple web app status bar style.
Set the canonical URL and its normalization options.
Set the robots directives.
Add a robots meta tag with the "all" directive, allowing search engines to index the page.
Add a robots meta tag with the "none" directive, preventing search engines from indexing the page.
Set Open Graph metadata.
Add an Open Graph image.
Add an Open Graph video.
Add Open Graph audio.
Set Twitter card metadata.
Set the Twitter card image.
Add a resource preload hint.
Add an asset preload hint.
Add a resource prefetch hint.
Add an asset prefetch hint.
Add a connection hint for an origin.
Add a DNS prefetch hint.
Add localized alternate URLs.
Add a feed link.
Add a named or property-based meta tag.
Add a link with optional attributes.
Add an icon candidate.
Add a favicon candidate.
Add an Apple touch icon.
Add a pinned-tab mask icon.
Set the web app manifest link.
Add an Apple startup image.
Set progressive web app metadata.
Remove unspecified link attributes.
Details
at line 37
abstract protected HeadData
headData()
Get the head data instance the fluent methods should write to.
at line 42
abstract protected SchemaFactory
schemaFactory()
Get the schema factory used to resolve schema callbacks.
at line 47
BuildsHead
title(string $title, string|null $prefix = null, string|null $suffix = null, bool|null $exact = null)
Use $exact to render the title without inherited prefix or suffix.
at line 57
BuildsHead
description(string $description)
Set the page description.
at line 67
BuildsHead
themeColor(string $color, Media|string|null $media = null)
Set the theme color for the given media.
at line 75
BuildsHead
applicationName(string $name)
Set the application name.
at line 83
BuildsHead
colorScheme(string $scheme)
Set the supported color schemes.
at line 91
BuildsHead
referrer(string $policy)
Set the referrer policy.
at line 99
BuildsHead
viewport(string $content)
Set the viewport metadata.
at line 107
BuildsHead
appleWebAppTitle(string $title)
Set the Apple web app title.
at line 115
BuildsHead
webAppCapable(bool $capable = true)
Set whether the page supports web app mode.
at line 123
BuildsHead
appleWebAppStatusBarStyle(string $style)
Set the Apple web app status bar style.
at line 131
BuildsHead
canonical(string|null $url = null, bool|null $forceHttps = null, bool|null $trailingSlash = null)
Set the canonical URL and its normalization options.
at line 143
BuildsHead
robots(string|RobotsRule|array $directives)
Set the robots directives.
at line 153
BuildsHead
searchableByRobots()
Add a robots meta tag with the "all" directive, allowing search engines to index the page.
at line 161
BuildsHead
hiddenFromRobots()
Add a robots meta tag with the "none" directive, preventing search engines from indexing the page.
at line 169
BuildsHead
og(OgType|string|null $type = null, string|null $title = null, string|null $description = null, string|null $url = null, string|null $image = null, string|null $video = null, string|null $audio = null, string|null $siteName = null, string|null $locale = null, string|null $determiner = null)
Set Open Graph metadata.
at line 200
BuildsHead
ogImage(string $url, string|null $alt = null, int|null $width = null, int|null $height = null, ImageType|string|null $type = null, string|null $secureUrl = null)
Add an Open Graph image.
at line 216
BuildsHead
ogVideo(string $url, string|null $alt = null, int|null $width = null, int|null $height = null, string|null $type = null, string|null $secureUrl = null)
Add an Open Graph video.
at line 232
BuildsHead
ogAudio(string $url, string|null $type = null, string|null $secureUrl = null)
Add Open Graph audio.
at line 242
BuildsHead
twitter(TwitterCard|string|null $card = null, string|null $site = null, string|null $creator = null, string|null $title = null, string|null $description = null, string|null $image = null)
Set Twitter card metadata.
at line 265
BuildsHead
twitterImage(string $url, string|null $alt = null)
Set the Twitter card image.
at line 275
BuildsHead
preload(string $href, string|null $as = null, bool|string|null $crossorigin = null, ImageType|string|null $type = null, Media|string|null $media = null)
Add a resource preload hint.
at line 285
BuildsHead
preloadAsset(string $path, string|null $as = null, bool|string|null $crossorigin = null, ImageType|string|null $type = null, Media|string|null $media = null)
Add an asset preload hint.
at line 295
BuildsHead
prefetch(string $href, string|null $as = null)
Add a resource prefetch hint.
at line 305
BuildsHead
prefetchAsset(string $path, string|null $as = null)
Add an asset prefetch hint.
at line 315
BuildsHead
preconnect(string $href, bool|string|null $crossorigin = null)
Add a connection hint for an origin.
at line 325
BuildsHead
dnsPrefetch(string $href)
Add a DNS prefetch hint.
at line 337
BuildsHead
paginate(Paginator|CursorPaginator $paginator)
Add rel=prev/next links from a paginator instance.
at line 349
BuildsHead
alternates(array $alternates)
Add localized alternate URLs.
at line 359
BuildsHead
feed(string $href, string $title, string $type = 'rss')
Add a feed link.
at line 371
BuildsHead
schema(SchemaObject|array|callable $schema)
Add a JSON-LD schema object to the page.
at line 385
BuildsHead
meta(string $key, string $content, bool|null $property = null, Media|string|null $media = null)
Add a named or property-based meta tag.
at line 397
BuildsHead
link(string $rel, string $href, array $attributes = [])
Add a link with optional attributes.
at line 407
BuildsHead
icon(string $href, ImageType|string|null $type = null, string|null $sizes = null, Media|string|null $media = null)
Add an icon candidate.
at line 419
BuildsHead
favicon(string $href, ImageType|string|null $type = null, string|null $sizes = null, Media|string|null $media = null)
Add a favicon candidate.
at line 427
BuildsHead
appleTouchIcon(string $href, string|null $sizes = null)
Add an Apple touch icon.
at line 437
BuildsHead
maskIcon(string $href, string|null $color = null)
Add a pinned-tab mask icon.
at line 447
BuildsHead
manifest(string $href = '/site.webmanifest', bool|string|null $crossorigin = null)
Set the web app manifest link.
at line 457
BuildsHead
appleTouchStartupImage(string $href, Media|string|null $media = null)
Add an Apple startup image.
at line 467
BuildsHead
pwa(string $name, string $manifest = '/site.webmanifest', string|null $themeColor = null, string|null $appleTouchIcon = null, string|null $appleTouchIconSizes = '180x180', string|null $appleWebAppStatusBarStyle = null)
Set progressive web app metadata.
at line 501
static protected array
linkAttributes(array $attributes)
Remove unspecified link attributes.