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
Breadcrumbs

Breadcrumbs Laravel Package

watson/breadcrumbs

Lightweight Laravel package for defining and rendering breadcrumb trails. Add breadcrumbs in PHP, attach them to routes, and output accessible HTML with Blade. Supports current-page detection, custom templates, nested trails, and simple configuration for Laravel applications.

View on GitHub
Deep Wiki
Context7

Breadcrumbs for Laravel, made easy.

Frequently asked questions about Breadcrumbs
How do I install and set up watson/breadcrumbs in Laravel?
Install it with composer require watson/breadcrumbs. The service provider is auto-discovered and a Breadcrumbs facade is registered, so there is no manual wiring. Publish the package's Blade partial so you own the markup from day one, then start registering definitions against your route names. Budget roughly half a day to a day and a half once restyling and a route-coverage test are included.
Which Laravel and PHP versions does watson/breadcrumbs support?
The package targets Laravel 8 through 11 on PHP 8.x, but its version ceiling is the single biggest adoption risk. Confirm the constraint resolves against your stack with a real composer require rather than trusting the README. If it caps below your current Laravel or PHP major, treat it as a small library to vendor rather than a dependency to rely on.
How do I define breadcrumbs and attach them to routes?
Breadcrumbs are defined in PHP as closures keyed by name, typically inside a service provider using the Breadcrumbs facade, and then attached to routes by name. When that route is matched, the package resolves the registered trail for rendering. Document a naming convention that maps route names to breadcrumb keys, because that mapping, not the code, is the real long-term maintenance burden.
How do I render breadcrumbs in a Blade layout?
Call the facade's render method from your layout or a Blade component and it outputs the trail as HTML. Most teams wrap it in their own component, such as x-breadcrumbs, so the package stays an implementation detail behind a boundary they control. Publish the view first so the styling and attributes are yours.
What happens when a route has no breadcrumb definition?
The public API includes an exists check, so you can guard rendering before calling render on routes that were never registered. Whether an unregistered route throws or silently renders nothing should be confirmed with a quick prototype against a deliberately undefined route, and that answer should drive the fallback in your wrapper component. Blast radius is low here, but silent empty output in production is worth designing around.
Does it support nested breadcrumb trails and route model binding?
Trails are keyed by name, so a parent can be registered and referenced to build nested chains for resources like categories. Definitions are closures that run against the current route, so any model lookups happen in your own code, and you should eager load parent chains rather than resolving them lazily inside the closure to avoid N+1 queries. Prototype a paginated index and a nested resource before committing.
Can I customize the breadcrumb HTML template?
Yes. The markup comes from a publishable Blade partial, so you can publish it and edit the elements, classes, and attributes directly. That is the recommended path anyway, since you will want your design system's classes and the accessibility attributes the shipped template lacks. Once published, the view is yours to maintain across package upgrades.
Are the breadcrumbs accessible and SEO-friendly out of the box?
Not fully. The shipped markup is Bootstrap-era and includes no aria-current attribute and no schema.org BreadcrumbList output, so accessibility and rich-result SEO requirements mean you write the view yourself. Publishing and restyling the partial with aria-current on the last item plus JSON-LD structured data covers both needs. That work is small, but it does erode part of the package's value.
Can I use watson/breadcrumbs with Inertia, Livewire, or an API-only app?
It is a poor fit there. The trail is rendered server-side rather than serialized, so Inertia, Livewire SPA-style front ends, and API-only services would have to expose the breadcrumbs as JSON themselves. It is built for server-rendered Laravel monoliths with Blade layouts; outside that, an in-house array builder is simpler and gives you the same result.
Is watson/breadcrumbs actively maintained and safe to depend on in production?
Adoption signal is weak: roughly 45 stars, no dependents, a bus factor of one, no vendor, no security policy, and no release cadence. That is tolerable mainly because blast radius is low, with no I/O, no user-input parsing, and no persistence, so a failure breaks a UI element rather than data integrity. Accept it as a pinned dependency you may need to fork or replace, and note the public API is a handful of calls, making a later swap to roughly 50 lines of in-house code a contained refactor.
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