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
Schema Breadcrumb Bundle

Schema Breadcrumb Bundle Laravel Package

exs/schema-breadcrumb-bundle

Symfony bundle that generates schema.org BreadcrumbList JSON-LD script tags from Twig. Pass an ordered array of breadcrumb items with name, URL, and optional image to the getJsonBreadcrumb() function to output valid structured data for search engines.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Schema Breadcrumb Bundle
Is exs/schema-breadcrumb-bundle a Laravel package?
No. It is a Symfony bundle built for the legacy AppKernel::registerBundles() registration model of the Symfony 2.x/3.x era. It ships no Laravel service provider, no facade, no config publishing and no package auto-discovery, so Composer cannot drop it into a Laravel app as distributed. Laravel's architectural fit with this package is effectively zero.
How do I install and register exs/schema-breadcrumb-bundle?
Install it with composer require exs/schema-breadcrumb-bundle, then add new EXS\SchemaBreadcrumbBundle\EXSSchemaBreadcrumbBundle() to the $bundles array inside registerBundles() in app/AppKernel.php. Registration is manual because the bundle predates Symfony Flex recipes and auto-discovery. In Laravel there is no equivalent registration step, which is one of the reasons the package cannot be used there directly.
How does the getJsonBreadcrumb() Twig function work?
You call getJsonBreadcrumb() with an ordered array of items, each having a name, a url and an optional image, and it returns a complete <script type="application/ld+json"> tag containing a schema.org BreadcrumbList. Position numbers are assigned automatically from the array order, starting at 1, so you never set position manually. Each entry is emitted as a ListItem whose item object uses the url as @id alongside name and image.
Can I use this bundle with Laravel Blade templates?
Not directly. The package exposes a Twig global function, and there is no Blade directive, helper or Blade component equivalent included. To get the same output in Laravel you would need to write a small Blade component or view composer that builds and encodes the array yourself. Lifting the logic out is roughly half a day to a day of work including tests.
Which Laravel and PHP versions does this package support?
None officially. The bundle targets Symfony ~2.3 to ~3.0, Twig ~1.x and PHP in the 5.5 to 7.0 range, so its Composer constraints will conflict with Laravel 8, 9, 10 or 11 on PHP 8.x. Attempting a require will fail dependency resolution or pin your platform to long-abandoned Symfony components. There is no roadmap for PHP 8 or modern framework compatibility.
What should I use instead for breadcrumb structured data in Laravel?
spatie/schema-org is the usual recommendation: it is Laravel-native, actively maintained, supports BreadcrumbList and ListItem, and can compose a full schema graph with Organization, Product, Article or FAQPage nodes. It also lets you control the JSON encoding flags and escaping, which matters for output inside a script tag. A ~50-line in-house builder is a reasonable alternative if breadcrumbs are the only schema you need.
How do I generate BreadcrumbList JSON-LD in Laravel without this bundle?
Build an array of ListItem nodes in PHP, mapping each item to @type ListItem, position from array index plus one, and item containing @id, name and optional image, then wrap it in @context https://schema.org and @type BreadcrumbList. Encode with json_encode using JSON_UNESCAPED_SLASHES, JSON_UNESCAPED_UNICODE and JSON_HEX_TAG so the payload is safe inside a script element. Render it from a Blade component such as <x-breadcrumbs-schema :items="$crumbs" /> and cover the position numbering and item omission rules with a feature test.
Does the bundle escape breadcrumb names and URLs safely?
Assume it does not until you verify the source. The bundle embeds values straight into a script context, so unescaped name, url or image strings create a script-injection risk, and json_encode returns false on invalid UTF-8, which can silently emit a broken or empty tag. If you reuse the logic, escape with JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS and JSON_HEX_QUOT, and validate or normalize URLs before output.
Can this bundle output Organization, Product or FAQPage schema too?
No. Its only responsibility is generating a BreadcrumbList from an ordered array, and there is no schema graph support or way to combine multiple types in a single JSON-LD block. Real applications almost always end up needing Organization, WebSite or Product markup alongside breadcrumbs, so you will need a second tool or your own builder. That limitation alone is a strong argument for a general-purpose library like spatie/schema-org.
Is this bundle actively maintained and tested for production?
The maturity signals are poor: zero stars, zero dependents, no visible release history, no test suite and no security policy. The only CI indicator is a Travis CI badge, a service effectively deprecated for open source projects, so expect no upstream fixes or CVE response. The functional risk surface is small and well bounded, but you should vendor or reimplement the logic rather than depend on the package in production.
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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource