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
Breadcrumbs

Breadcrumbs Laravel Package

tabuna/breadcrumbs

Laravel breadcrumbs made easy: define breadcrumb trails right in your route definitions with a fluent API (parent/push), automatic route detection, and support for request parameters and model binding to generate consistent navigation across your app.

View on GitHub
Deep Wiki
Context7

Laravel Breadcrumbs - An easy way to add breadcrumbs to your @Laravel app.

Frequently asked questions about Breadcrumbs
How do I install and set up Laravel Breadcrumbs in my project?
Run `composer require tabuna/breadcrumbs` to install. Define breadcrumbs directly in route files using the `breadcrumbs()` method with a closure accepting a `Trail` object. No additional configuration is needed for basic usage.
Can I use Eloquent models or request parameters in breadcrumb generation?
Yes. The package supports model binding and named parameters. For example, pass a `Category` model to your closure and use `$category->title` or `route('category', $category->id)` to dynamically generate breadcrumbs.
What Laravel versions does this package support?
The package requires Laravel 10+ and PHP 8.1+. Named parameter resolution relies on Laravel’s container improvements, so downgrading to Laravel 9.x will break functionality. Always pin to `5.x` in `composer.json` to avoid unintended upgrades.
How do I create nested breadcrumb trails (e.g., Home > Category > Product)?
Use the `parent()` method to reference existing trails. For example, `$trail->parent('home')->push('Category', route('category'))` builds on the 'home' trail. The package automatically handles route detection for cleaner code.
Will this package work with my custom route generators?
Yes, but refactoring may be needed if you’re using `Trail::call()` directly. Replace it with `app()->call()` or dependency injection via constructor. The package now enforces stricter encapsulation to prevent misuse of internal methods.
How do I test breadcrumb functionality in my Laravel app?
Test breadcrumbs by asserting route names, parameters, and generated HTML in your feature tests. Use `Trail::get()` to inspect trails or mock the `Trail` object in unit tests. The package includes 100% mutation testing coverage for reliability.
Are there performance concerns with named parameter resolution?
Minimal overhead exists due to Laravel’s container dependency injection, but it’s negligible for most use cases. If you’re micro-optimizing, benchmark in staging. Caching strategies may need review if breadcrumbs use `Cache::tags()`.
Can I use this package with non-Laravel PHP applications?
No. The package relies on Laravel’s route system, container, and Blade components. For non-Laravel apps, consider alternatives like manual HTML generation or custom breadcrumb libraries for vanilla PHP.
What alternatives exist for Laravel breadcrumbs?
Alternatives include `diglactic/laravel-breadcrumbs` (simpler but less feature-rich) or `spatie/laravel-menu` (for menus + breadcrumbs). This package stands out for its fluent API, route parameter support, and automatic route detection.
How do I migrate from older versions if I’m using `Trail::call()`?
Replace `Trail::call()` with `app()->call()` or refactor to use dependency injection via constructor. The package’s `hasMacro` guard prevents accidental macro overwrites, but no deprecation warnings exist for positional arguments—test thoroughly after upgrading.
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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle