Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Meta Tags

Laravel Meta Tags Laravel Package

torann/laravel-meta-tags

Torann Laravel Meta Tags helps Laravel apps define and render page metadata from PHP or Blade, with support for titles, descriptions, Open Graph-style tags, custom tags, and configurable defaults for clean layout output.

View on GitHub
Deep Wiki
Context7

A package to manage Header Meta Tags

Frequently asked questions about Laravel Meta Tags
How do I install torann/laravel-meta-tags in a Laravel application?
Install it with Composer using composer require torann/laravel-meta-tags. The package supports Laravel auto-discovery, so the service provider and MetaTag facade are registered without editing config/app.php. You can optionally publish the config file to change defaults, and then call MetaTag::render() inside your shared head partial. Total integration is roughly one Composer command, one optional publish step, and one Blade line.
Does torann/laravel-meta-tags support Laravel 10, 11, and 12?
There is no verified compatibility claim for those versions. The last release was 3.0.9 in February 2021, and its only notable constraint change was loosening the Laravel requirement to >=, which lets Composer install the package on newer frameworks without evidence it was tested there. Treat runtime behavior on Laravel 10, 11, or 12 as unverified and run a short spike on your exact PHP and Laravel matrix before committing. If it misbehaves, the small API surface makes a fork or vendored copy practical.
How do I render meta tags in a Blade template with this package?
Populate the registry from a controller, middleware, or view composer using the fluent setters, then output everything once in your layout head with an unescaped Blade echo of MetaTag::render(). Keeping a single render call in the shared head partial is the pattern the package is designed around. Avoid scattering individual title and Open Graph tags across views, since that is exactly the duplication the package is meant to remove.
Is torann/laravel-meta-tags safe from XSS, or does it escape tag values?
Rendering is raw output, so escaping of attribute values is the caller's responsibility rather than something the package guarantees. Any meta value derived from user or CMS content, such as a listing title, display name, or category label, is an injection surface. Test with a hostile string such as a quoted attribute break plus a script tag before adoption. If values pass through unescaped and you cannot control input provenance, wrap the renderer or fork the package to escape on output.
Can torann/laravel-meta-tags generate Open Graph and Twitter Card tags?
Yes, Open Graph properties and Twitter Card metadata are part of the built-in feature set alongside standard SEO tags like title and description. You set them through the same fluent helpers rather than hand-writing og: and twitter: markup in Blade. Note that the package is a tag renderer, not a full SEO subsystem, so it does not handle structured data, sitemaps, hreflang, or canonical-URL policy for you.
Does the package prevent duplicate title tags or conflicting canonical tags?
Uniqueness enforcement is not documented, so do not assume the package suppresses duplicate or conflicting tags. Duplicate title tags, competing canonicals, or relative Open Graph image URLs cause silent indexing and share-preview damage that shows up in Search Console rather than application monitoring. Treat uniqueness and absolute-URL rules as your own policy, and verify the rendered head output in a test. Adding a render-time assertion is cheaper than discovering duplicates in production.
How do I set default meta tags and override them per page?
Defaults come from the package configuration file, which you can publish and edit, and per-page overrides are applied through the fluent API before rendering. That gives you a baseline title, description, and image site-wide while letting individual controllers or views replace them. Keep the override logic near where the page data is assembled so it stays obvious which values win.
Can I add custom meta tags and attributes with torann/laravel-meta-tags?
Yes, custom tags and attributes are an advertised capability, so you are not limited to the built-in SEO, Open Graph, and Twitter helpers. This is useful for less common tags, verification codes, or vendor-specific metadata. Because rendering is raw, validate and escape any custom attribute values you supply.
Is torann/laravel-meta-tags still maintained, and what should I use instead?
Maintenance posture is the package's weakest point: it is a single-maintainer project with no release since February 2021, 66 stars, zero dependents, and no published support or security-response path. The BSD-2-Clause license and small API surface keep the abandonment risk low in practice, provided your team agrees in advance to fork or vendor rather than wait upstream. If you want active maintenance, evaluate alternatives such as artesaos/seotools, butschster/meta-tags, or ralphjsmit/laravel-seo, or build a small in-house Blade component plus config, which is roughly 150 lines and removes the ownership question entirely.
How should I test meta tag output before using this package in production?
Start with a half-day spike on your real Laravel and PHP versions, then assert on the rendered head in a feature test: one title, one canonical, absolute Open Graph image URLs, and correctly escaped attribute values. Include a hostile input case to confirm escaping behavior, since the package renders raw. Also compare the output against your marketing and search-console expectations, because SEO regressions from duplicate or relative tags do not surface in application monitoring.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections