diglactic/laravel-breadcrumbs
Laravel-style breadcrumb generator for modern Laravel apps. Define breadcrumb trails in code, render them with built-in or custom templates, support structured data and route-bound breadcrumbs, with advanced options and troubleshooting docs.
routes/breadcrumbs.php, decoupling UI logic from business logic. This modularity simplifies maintenance and testing.routes/breadcrumbs.php + optional config/breadcrumbs.php). No database migrations or schema changes.davejamesmiller/laravel-breadcrumbs maintains stability.{{ Breadcrumbs::render() }}) reduce boilerplate and integrate smoothly with Laravel’s templating engine.Post $post), enabling dynamic breadcrumbs without manual URL construction.Breadcrumbs::for('home')). Misnamed routes or refactoring could break breadcrumbs without proper migration.'home', 'blog') align with existing route naming conventions? Will a naming standard (e.g., breadcrumb.{route}) be enforced?breadcrumb.).home, about) to validate the package’s behavior.config/breadcrumbs.php file (e.g., default template, separators).php artisan vendor:publish --tag=breadcrumbs-views) if overriding defaults.<head> for SEO-critical pages (e.g., blog posts) and validate with Google’s Rich Results Test.Breadcrumbs:: namespace.php artisan route:cache), but breadcrumb definitions must be updated if routes change.composer require diglactic/laravel-breadcrumbs
routes/breadcrumbs.php and define initial breadcrumbs.php artisan vendor:publish --tag=breadcrumbs-config
php artisan vendor:publish --tag=breadcrumbs-views
config/breadcrumbs.php to set the default view.resources/views/vendor/breadcrumbs/ or create custom views.{{ Breadcrumbs::render('name', $param) }} in Blade files.{{ Breadcrumbs::view('breadcrumbs::json-ld', 'post', $post) }}
routes/breadcrumbs.php, reducing runtime logic.diglactic/laravel-breadcrumbs for breaking changes (e.g., Laravel 14 support).Breadcrumbs::generate('name', $param) to inspect the breadcrumb collection in logs or tests.storage/logs/laravel.log for route resolution errors.routes/web.php.Post $post).$breadcrumbs).Cache::remember).@include or partials.routes/breadcrumbs.php into smaller files (e.g., routes/breadcrumbs/admin.php) using service providers.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Route name mismatch | Broken breadcrumb links | Use route name linter or CI checks. |
| Missing breadcrumb definition | Empty or incorrect trail | Default to a "Home" link or 404. |
| Template rendering errors | Broken UI | Fallback to a simple <div> or debug output. |
| Closure parameter mismatch | Undefined variable errors |
Type-hint parameters and validate inputs. |
| Structured data validation failures | SEO penalties | Test with Google’s Rich Results Tool. |
| Deeply nested breadcrumbs | Slow rendering | Cache trails or flatten hierarchy. |
How can I help you explore Laravel packages today?