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

Meta Tags Laravel Package

torann/meta-tags

Meta tags manager for Laravel that adds SEO and social metadata to models and views with a fluent, configurable API. It handles titles, descriptions, Open Graph, and Twitter cards, keeping tag setup readable and centralized.

View on GitHub
Deep Wiki
Context7

torann/meta-tags is a Laravel package for managing meta tags in your application. It provides a fluent API to define page titles, descriptions, keywords, and social sharing metadata directly from your controllers or views, then renders them into clean HTML in your Blade templates.

  • Fluent, chainable API for defining meta tags in controllers and views
  • Built-in support for Open Graph and Twitter Card tags
  • Configurable defaults and per-page overrides
  • Blade directives and helpers for simple template integration
  • Extensible design for custom tags and drivers
Frequently asked questions about Meta Tags
What is torann/meta-tags and what problem does it solve?
Torann Meta Tags is a Laravel package that generates and manages page meta tags from a single, fluent API. Instead of scattering title, description, Open Graph, and Twitter card markup across Blade templates, you define them once and render them in your views. It is aimed at developers who want simple, readable meta tag handling without pulling in a large SEO suite.
How do I install torann/meta-tags in a Laravel app?
Install it with Composer using composer require torann/meta-tags. The package follows standard Laravel package conventions, so on older Laravel versions you may need to register the service provider and facade manually, while newer versions use package auto-discovery. After that, publish any provided configuration if the README instructs you to do so and review the default settings.
Which Laravel versions does this package support?
Support depends on the package release you install, so always check the composer.json constraints and the README for the version you are pulling in. Packages like this one are often updated for newer Laravel releases over time, but older tags may target earlier framework versions. If you are on the latest Laravel, verify compatibility before adding it to a production project.
How do I render the meta tags in a Blade view?
You set your tags through the package's fluent API, typically from a controller, middleware, or view composer, and then output them in your layout with the package's rendering call inside your head section. Because the tags are collected centrally, any Blade layout that includes that render call picks them up automatically. This keeps your head markup in one place and avoids duplicating meta tags per page.
Can I define Open Graph and Twitter card tags with it?
Yes, the package is built around common meta tag groups including Open Graph and Twitter cards alongside standard titles and descriptions. You define each group once through the fluent API and they are rendered together with your other tags. That makes it straightforward to keep social sharing metadata consistent across pages.
Does it support custom or arbitrary meta tags?
The package is designed to handle custom tags in addition to the built-in title, description, Open Graph, and Twitter groups. You can add your own name or property values through the same fluent interface rather than hand-writing markup in Blade. This is useful for verification tags, app-specific metadata, or third-party integrations.
Can I set meta tags per page or per route?
Yes, the typical pattern is to set tags in the controller action or a middleware for the page being rendered, so each route gets its own title and description. Because the API is fluent, you can chain several definitions in one place and then let the layout render them. Defaults can be set once for pages that do not override anything.
How should I test that meta tags are output correctly?
Use Laravel's HTTP testing helpers to make a request to a route and assert that the rendered response contains the expected title, description, and social tags. Asserting on specific strings is usually enough, though you can also assert on the order of tags if it matters for your layout. Keep a small test per tag group so regressions in your layout are caught quickly.
Is there any performance or caching concern when using this package?
Meta tag generation is lightweight string assembly that happens during the request, so it typically has negligible impact on response time. If your titles and descriptions come from a database or an external source, cache those lookups rather than the rendered tags themselves. Also make sure any per-request state is reset between requests if you reuse the same instance in long-running workers.
What alternatives exist if torann/meta-tags does not fit my needs?
Alternatives include other Laravel SEO and meta packages such as arcanedev/seo-helper or spatie/schema-org when you need structured data, as well as building a small custom service class and Blade component. The right choice depends on whether you need sitemaps, schema.org markup, or multi-language support. For simple title and social tag management, this package is intentionally minimal and easy to reason about.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console