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

Seo Bundle Laravel Package

abdellahramadan/seo-bundle

Symfony SEO bundle providing meta tags, Open Graph/Twitter cards, Schema.org structured data, sitemap generation, breadcrumbs, Google Tag and Meta Pixel integration, plus dev-mode SEO profiling. Configure via DI or Twig helpers for easy template rendering.

View on GitHub
Deep Wiki
Context7

All in One Symfony Seo Bundle

Frequently asked questions about Seo Bundle
Can I use this bundle directly in a Laravel project without Symfony?
No, this bundle is designed for Symfony and relies on its dependency injection, Twig templating, and event system. For Laravel, you’d need to create a custom wrapper or use middleware/service providers to replicate its functionality, such as meta tags or OpenGraph generation. Consider Laravel-native alternatives like `spatie/laravel-seo` for a smoother integration.
How do I configure meta tags in Laravel if I adapt this bundle?
You’d need to replace Symfony’s `MetaTagsManagerInterface` with a Laravel service class that mimics its methods (e.g., `setTitle()`, `setDescription()`). Use Laravel’s service container to bind this class and inject it into controllers. For Twig-like functionality, replace `{{ meta_tags }}` with Blade directives or view composers to render the tags in your layout.
Does this bundle support Laravel’s Blade templating instead of Twig?
No, the bundle is hardcoded for Twig. To use it in Laravel, you’d either need to polyfill Twig or replace its templating logic with Blade directives. For example, create a Blade component or view composer that generates the same HTML output as the Twig helpers. Alternatively, use Laravel’s native `collective/html` package for meta tags.
What Laravel versions does this bundle officially support?
This bundle is not officially supported in Laravel. It’s built for Symfony and would require manual adaptation. However, if you’re using Laravel 8+ with Symfony components (like Lumen), you might integrate it more easily. For pure Laravel, compatibility depends on your custom wrapper’s implementation, but no version-specific guarantees exist.
How do I generate sitemaps in Laravel if I can’t use this bundle?
For Laravel, use the `spatie/laravel-sitemap` package, which is purpose-built for generating XML sitemaps dynamically. It integrates seamlessly with Laravel’s routing and caching systems. If you need advanced features like this bundle’s sitemap generation, you could adapt its logic into a Laravel service, but `spatie/laravel-sitemap` is likely sufficient for most use cases.
Can I use the OpenGraph/Twitter card features in Laravel without Symfony?
Yes, but you’ll need to replicate the bundle’s `OpenGraphManagerInterface` logic in Laravel. Create a service class to handle OpenGraph tags (e.g., `og:title`, `og:image`) and inject it into controllers. For Blade templates, use directives like `@openGraph` or include a partial view. Libraries like `spatie/laravel-seo` also provide OpenGraph support natively.
Is there a way to integrate Schema.org structured data without this bundle?
Absolutely. Laravel’s Blade templating can generate JSON-LD or Microdata directly in views. Use packages like `spatie/laravel-json-ld` for structured data generation, or manually output JSON-LD scripts in your layout. The bundle’s `SchemaManager` can be replicated with a Laravel service that constructs the schema markup based on your data model.
How do I add Google Tag Manager or Meta Pixel in Laravel?
For Laravel, include the Google Tag Manager or Meta Pixel snippet directly in your Blade layouts using `@include` or view composers. Alternatively, use middleware to inject the scripts globally. The bundle’s `TagManager` can be adapted into a Laravel service, but most projects handle this with static HTML snippets or JavaScript tags for simplicity.
What’s the best alternative to this bundle for Laravel SEO?
For Laravel, consider `spatie/laravel-seo` for meta tags, OpenGraph, and Twitter cards, or `laravel-backpack/seo` for a more comprehensive solution. Both packages are Laravel-native, actively maintained, and avoid Symfony’s dependencies. If you need sitemaps, `spatie/laravel-sitemap` is a direct alternative to this bundle’s feature.
How do I test SEO functionality in Laravel if I adapt this bundle?
Test meta tags, OpenGraph, and structured data by asserting their presence in rendered views using Laravel’s `tests/Feature` tests. For example, use `assertContains()` to verify meta tags in the HTML output. Mock the adapted service classes in unit tests to validate their logic. Tools like Laravel Debugbar can also inspect rendered tags during development.
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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware