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

yajra/laravel-breadcrumbs

A lightweight breadcrumb package for Laravel that helps you define and render breadcrumb trails in Blade views. It supports route-based breadcrumb definitions and simple customization, making it easy to add structured navigation to your application without complex configuration.

View on GitHub
Deep Wiki
Context7

A simple Laravel-style way to create breadcrumbs in Laravel 5.4+.

Frequently asked questions about Laravel Breadcrumbs
How do I install yajra/laravel-breadcrumbs in a Laravel application?
Install it with Composer using composer require yajra/laravel-breadcrumbs. On Laravel 5.4 and newer the service provider is auto-discovered, so no manual registration is needed, and the config file is optional and publishable if you want to customize behavior. You then create a routes/breadcrumbs.php definition file and add a single render call to your layout. There are no migrations, schema changes, or additional infrastructure dependencies.
Which Laravel versions does yajra/laravel-breadcrumbs support?
The package advertises compatibility with Laravel 5.4 and up, but that claim spans an enormous API gap across majors. Check the illuminate/support constraint in its composer.json and confirm which versions it has actually been exercised against in CI. Laravel 6 removed the str_ and array_ global helpers, Laravel 8 changed factories and namespaces, and Laravel 9 through 11 moved the PHP floor and deprecation behavior, any of which can break a thin provider or DSL. Test on your exact target major before committing.
How do I define breadcrumbs for a route in Laravel with this package?
You describe trails once in a dedicated breadcrumbs definition file or a closure, keyed by route name such as admin.users.edit, rather than writing markup inside each view. Each definition supplies the trail segments and their labels, and parent relationships can be chained so child pages inherit the trail automatically. Registering the definitions in one file keeps navigation markup separate from application logic.
How do I render breadcrumbs in a Blade template?
Rendering is a single facade call placed in a layout partial, typically layouts/app.blade.php, so every page that extends the layout inherits the trail. Because the call lives in exactly one place, you can swap or remove the package later by editing that partial only. Keep it out of individual views to avoid inconsistent output and duplicated markup.
Can breadcrumb segments use dynamic route parameters and bound models?
The package is route-aware and supports dynamic segments, but you should verify whether definition callbacks receive route parameters and route-model binding, or only raw string values. If it passes raw strings only, resolve models yourself inside the closure using the route parameter. Confirm this behavior against the source or a quick spike before designing trails that depend on it.
Does yajra/laravel-breadcrumbs escape breadcrumb labels to prevent XSS?
Escaping behavior is not documented in the package overview, so inspect the renderer before shipping. Labels frequently interpolate model attributes and user-supplied strings, which makes default escaping a real security concern rather than a cosmetic one. If the renderer does not escape by default, wrap labels yourself or avoid any documented pattern that encourages unescaped Blade output syntax.
Is yajra/laravel-breadcrumbs a fork of davejamesmiller/laravel-breadcrumbs, and can I run both?
It re-implements the same breadcrumb concept as davejamesmiller/laravel-breadcrumbs, so treat them as competing solutions for one responsibility. Installing both in a single application can produce shadowed Blade directives and confusing view behavior that is hard to debug. Enforce single ownership of breadcrumb rendering during code review.
Is yajra/laravel-breadcrumbs actively maintained and safe to use in production?
Check the last commit, the last tagged release, and the CI matrix before adopting it, because the project has few stars and zero dependents, which means little community pressure to keep it current. There is no meaningful security surface here, since the package does no input parsing, deserialization, SQL, or file I/O, so the realistic failure mode is staleness and availability rather than compromise. The equivalent logic is roughly 30 to 50 lines, so if it is abandoned you can vendor the source into app/Support in under a day. That is only true if your team treats the code as vendorable rather than as an external contract.
Does yajra/laravel-breadcrumbs generate schema.org BreadcrumbList JSON-LD for SEO?
No. The package emits breadcrumb navigation markup for Blade templates and does not produce schema.org BreadcrumbList structured data. If rich-result eligibility is the actual driver for adding breadcrumbs, plan on generating the JSON-LD yourself regardless of whether you build or buy. Headless and Inertia frontends that need navigation metadata serialized to JSON are also outside its scope.
What are the alternatives to yajra/laravel-breadcrumbs and when should I write my own?
The main alternative is davejamesmiller/laravel-breadcrumbs, which this package re-implements, so pick one and stay with it. This package fits server-rendered Laravel monoliths using Blade layouts and conventionally named routes that already encode hierarchy. It is a poor fit for API-only services, SPA frontends consuming JSON navigation metadata, or multi-tenant applications where the trail must be data-driven rather than route-driven. Given the small scope, forking the logic into app/Support is a realistic option and usually costs less than a day.
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.
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
noith/settings