Weave Code
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 Seo

Laravel Seo Laravel Package

ralphjsmit/laravel-seo

Laravel SEO made easy: generates valid meta tags out of the box (title, meta, OpenGraph, Twitter, structured data, favicon, robots, alternates). Store SEO per model, render with seo()->for($model), or provide dynamic SEOData without saving.

View on GitHub
Deep Wiki
Context7

A package to handle the SEO in any Laravel application, big or small.

Frequently asked questions about Laravel Seo
How do I quickly set up SEO for a Laravel blog using this package?
Install via Composer, publish migrations/config, then attach the `HasSEO` trait to your `Post` model. Update SEO data via `$post->seo->update(['title' => '...', 'description' => '...'])` and render tags in Blade with `{!! seo()->for($post) !!}`. No manual tag generation needed.
Does this package work with Laravel 10+ and Inertia.js?
Yes, it’s fully compatible with Laravel 10/11 and automatically adds the `inertia` attribute to `<title>` tags for SPAs. No extra configuration is required for Inertia.js integration.
Can I generate SEO tags dynamically without storing them in the database?
Absolutely. Use the `getDynamicSEOData()` method in your model to compute SEO fields on-the-fly (e.g., pull `title` from the model’s `name` field). The package merges dynamic data with static SEO records automatically.
What structured data schemas does this package support out of the box?
It includes built-in JSON-LD schemas for **Article**, **Breadcrumbs**, and **FAQPage**. You can also extend it for custom schemas like **Product** or **HowTo** by creating a `SEODataTransformer` for your model.
How do I handle multi-language SEO (hreflang tags) with this package?
The package doesn’t include built-in hreflang support, but you can manually add `AlternateTag` entries via the config or middleware. For multi-language sites, pair it with `spatie/laravel-translatable` or manage hreflang tags in your SEO model’s `alternate_links` field.
Will this package slow down my high-traffic Laravel app?
The package is lightweight, but dynamic SEO data (`getDynamicSEOData()`) can impact performance if called on every request. Cache the results in your model or use Laravel’s cache facade for heavy computations.
Can I use this for API responses or headless Laravel apps?
While designed for Blade templates, you can manually pass SEO data to API responses by instantiating a `SEOData` object. However, it lacks built-in support for non-Eloquent data sources like GraphQL or API-driven responses.
How do I customize the default title suffix (e.g., add my site name)?
Set the `title_suffix` in the published config file (`config/seo.php`). For example, `'title_suffix' => ' | My Awesome Site'` will append your site name to every title. Override it per-model via `getDynamicSEOData()` if needed.
Does this package handle favicons and robots.txt automatically?
Yes. Favicons are rendered via the `favicon` config path, and robots tags (e.g., `noindex`) are controlled by the `robots` field in your SEO model. Configure defaults in `seo.php` and override them per-page as needed.
What’s the best way to test SEO tags in my Laravel app?
Use Laravel’s HTTP tests to assert rendered tags: `assertStringContainsString('<title>Your Title</title>', $response->getContent())`. For structured data, validate JSON-LD output with Google’s [Rich Results Test](https://search.google.com/test/rich-results). Test dynamic SEO by mocking `getDynamicSEOData()` in unit tests.
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.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai