- How do I install infernalmedia/meta-tags in Laravel?
- Install it with Composer, then publish any package configuration and confirm the service provider is registered; Laravel package discovery usually handles provider registration. After that, follow the README to set tags from controllers or Blade and render them in your head layout. Verify the exact publish command and config filename against the repository README.
- Which Laravel and PHP versions does infernalmedia/meta-tags support?
- The provided context does not list exact Laravel or PHP version constraints, so treat composer.json as the source of truth. Check the package require constraints against your app's pinned Laravel and PHP versions before scheduling adoption. If your app is on an older Laravel release, test installation in a branch first because small community packages may lag current framework versions.
- How do I set a page title and meta description from a Laravel controller?
- The package is designed to define metadata behind a simple API and resolve it for rendering, so you can set a page title and description from a controller or Blade before the head is rendered. Use the package methods documented in the README rather than duplicating meta markup in views. Centralize defaults and per-page overrides so every route resolves consistently.
- Can I use infernalmedia/meta-tags with Blade templates?
- Yes, the package is aimed at server-rendered Laravel apps that output HTML through Blade. You typically render the resolved tags inside your layout head section so pages inherit defaults and controllers can override them. It is not intended to replace a client-side head manager in an SPA.
- Does infernalmedia/meta-tags support Open Graph and Twitter card tags?
- The package scope includes title, description, canonical, robots, Open Graph, and Twitter card metadata. You can configure those tags per page through the package API, subject to the exact options in the README. Confirm default output and ordering before relying on it for social previews.
- How should I test rendered meta tags in Laravel feature tests?
- You can add Laravel feature tests that request routes and assert the rendered head contains expected title, description, canonical, and social tags. Because output is injected into HTML, test escaping, ordering, and defaults as well as presence. Build a small parity test suite before expanding package use across routes.
- What are the risks of upgrading infernalmedia/meta-tags to v1.2.0?
- The release notes are described as a bare changelog link, so the contents of the v1.1.1 to v1.2.0 diff are unverified. A minor bump should be backwards-compatible under semver, but default config values, escaping, or Blade output could still change rendered markup site-wide. Read the diff first and pin to v1.1.1 if the change is ambiguous.
- Can infernalmedia/meta-tags handle escaping for user-supplied titles and descriptions?
- The context does not confirm whether the package escapes or sanitises user-supplied titles and descriptions, so do not assume it does. Verify the implementation and add tests with quotes, ampersands, and HTML-like input. If needed, escape or sanitise values before passing them to the package and avoid raw output in Blade.
- Is infernalmedia/meta-tags actively maintained?
- The provided assessment flags maintenance as an open question and notes that commit cadence, issue count, and the last release date should be checked. Review the GitHub repository for recent activity and release history before adopting it for a long-lived application. If maintenance looks stale, pin a known version and keep a rollback path.
- What are alternatives to infernalmedia/meta-tags, and when should I avoid it?
- Alternatives include hand-rolled Blade partials or sections, CMS-managed metadata fields, client-side head managers for SPAs, and other Laravel SEO packages. This package fits content-heavy, server-rendered Laravel apps that need consistent metadata across many routes. Avoid it for API-only services or SPA frontends where meta tags are set outside server-rendered Blade.