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
Laravel Breadcrumbs

Laravel Breadcrumbs Laravel Package

diglactic/laravel-breadcrumbs

A simple, Laravel-style way to create breadcrumbs. Define breadcrumbs alongside routes, output them with custom templates, generate structured data, and bind breadcrumbs to route models. Official fork of Dave James Miller's classic package.

View on GitHub
Deep Wiki
Context7

A simple Laravel-style way to create breadcrumbs.

Frequently asked questions about Laravel Breadcrumbs
How do I install diglactic/laravel-breadcrumbs in a Laravel app?
Install it with composer require diglactic/laravel-breadcrumbs; the package service provider and config are auto-discovered. Create a routes/breadcrumbs.php file for your definitions, then optionally publish the config with php artisan vendor:publish --tag=breadcrumbs-config to set your default view. Finally, add Breadcrumbs::render() to your layout or views. The whole setup usually takes minutes rather than hours.
Which Laravel versions does laravel-breadcrumbs support?
Package 10.x supports Laravel 10, 11, 12, and 13. Laravel 9, 8, 7, and 6 map to older package majors, 9.x and 8.x respectively. For very old Laravel versions, the original davejamesmiller/laravel-breadcrumbs project is the reference. Check the compatibility chart before planning a Laravel upgrade.
Where do I define breadcrumbs in Laravel?
Definitions live in routes/breadcrumbs.php, which the package service provider loads automatically. Each breadcrumb is a closure registered with Breadcrumbs::for(), and closures receive route parameters so you can build dynamic titles from models. Keeping definitions in one routing-adjacent file means controllers and models need no modification.
How do I render breadcrumbs in a Blade layout?
Call Breadcrumbs::render('home') in your Blade layout where the trail should appear, passing route parameters when the definition needs them. The output uses the view configured in config/breadcrumbs.php. You can also call Breadcrumbs::generate() to get the trail collection and render it with your own markup.
What are route-bound breadcrumbs in laravel-breadcrumbs?
Route-bound breadcrumbs let you name each breadcrumb after its route, so the package resolves the current trail automatically from the matched route. Instead of calling Breadcrumbs::render() in every view, you render once in your layout. This removes scattered render calls and keeps breadcrumb names in sync with route names.
How do I output JSON-LD structured data for breadcrumbs?
Render the built-in JSON-LD view with Breadcrumbs::view('breadcrumbs::json-ld', 'breadcrumb-name') inside a script tag in your head section, passing any route parameters the definition needs. The package outputs schema.org BreadcrumbList markup that search engines can consume. Validate the result with Google's Rich Results test before shipping, since structured-data requirements change.
Does laravel-breadcrumbs support Bootstrap 5 and Tailwind?
Yes. The package ships Blade templates for Bootstrap 4 and 5, Tailwind, Bulma, Foundation 6, Materialize, and UIkit. Set the view in config/breadcrumbs.php, or publish the views with php artisan vendor:publish --tag=breadcrumbs-views to customize the markup for your design system.
Is diglactic/laravel-breadcrumbs a drop-in replacement for davejamesmiller/laravel-breadcrumbs?
Yes, it is the official fork of Dave James Miller's package and keeps the same public API, so swapping the Composer package needs minimal code changes. All original tags are mirrored, and the README states there is no functional difference for older versions. You mainly gain an active release train aligned with Laravel 10 through 13.
Why does laravel-breadcrumbs throw an exception when a breadcrumb is missing?
If the current route has no matching definition, the package fails hard rather than silently rendering an empty trail. That is deliberate, because a missing breadcrumb usually signals a forgotten definition, but it means one broken closure can take down the whole page render, including head content. Define breadcrumbs for every routable page or wrap the render call in a guard if you prefer graceful omission.
Are recursive breadcrumbs a performance or N+1 problem?
Breadcrumbs are generated at render time, so recursive definitions like $trail->parent('category', $category->parent) or loops over ancestors can trigger extra queries. Eager-load ancestor relationships in your controller to keep the trail to a constant number of queries. This is a code-review concern rather than a package defect, since definitions are just closures.
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.
dakiquang/laravel-oauth-refresh-lock
woda/laravel-worktrees
dalefranks/ramasite
faghy/laracashbook
roundly-consulting/google-places-for-laravel
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
adachsoft/changelog-linter