Introduction
laravel/head is the official Laravel package for managing your application’s document<head> through a fluent API. It supports title and meta tags, Open Graph, canonical URLs, robots directives, performance hints, and structured data, and works with Blade, Livewire, and Inertia. v0.1.0 was released on July 28, 2026.
Resolution priority
The head data for a page is resolved through the following five layers, from lowest to highest priority.- Page defaults
- Route group metadata
- Route metadata
- Runtime metadata
- Error page metadata
Registering defaults
Register site-wide defaults in a service provider.Acme is used verbatim; when a higher layer sets a title, the inherited suffix is applied (Head::title('About') becomes About - Acme).
Route metadata
Static pages can attach metadata directly to their route definitions.withHead() stores plain arrays through Laravel’s standard route metadata API (under the head key of ->metadata()), so it remains compatible with cached routes.
Runtime metadata
Values that aren’t known until the request arrives — like a post title — are set at runtime via theHead facade.
when() / unless().
Error pages
You can also register metadata for each status code.Open Graph and Twitter Card
Set Open Graph properties withog() and add images, videos, or audio with methods like ogImage().
title and description automatically fill in an unset og:title and og:description.
Twitter Card renders automatically from the same title, description, and image as Open Graph as long as you register it in your defaults.
PWA, performance, and icons
Thepwa() helper sets the <head> tags you need for an installable web app in one call.
Theme color
Theme color can be set globally, per route, or at runtime. Use theMedia enum to specify per-media theme colors.
Media also includes Portrait and Landscape.
App metadata and icons
Laravel Head includes helpers for common browser and app metadata.favicon() is an alias for icon() and accepts the same type, sizes, and media arguments.
Performance and discoverability
Laravel Head can also render performance hints, pagination links, locale alternates, and feed discovery tags.preloadAsset() / prefetchAsset() resolve the URL with the asset() helper and detect the as attribute from the extension.
Custom tags
Tags without a dedicated method can be added withmeta() / link().
meta() uses name= for ordinary meta tags, but automatically switches for keys that should use property=, such as Open Graph (og:) or article metadata (article:).
Structured data (JSON-LD)
The built-in schema builder covers the major JSON-LD types.article, blogPosting, product, offer, brand, breadcrumbs, faq, organization, person, webPage, and webSite. Unknown factory methods fall back to a generic schema object, so you can represent custom schema.org types too.
Breadcrumb items can be added one at a time or in bulk. Positions are assigned automatically in insertion order.
question() for one, or questions() for many.
Wrap-up
laravel/head centralizes the metadata you need for SEO and social sharing across Blade, Livewire, and Inertia. Its five-layer structure — defaults, route, runtime, and error pages — keeps site-wide consistency while still allowing flexible per-page customization.
laravel/head repository
Source code and the latest updates.