chamber-orchestra/breadcrumbs
Laravel breadcrumbs helper for Chamber Orchestra apps. Define breadcrumb trails in code, generate navigable links for pages, and keep UI navigation consistent across routes/views. Lightweight package aimed at simple breadcrumb management in PHP.
spatie/laravel-breadcrumbs) may offer better cohesion.ArrayAccess, IteratorAggregate, and Countable interfaces are language-agnostic and can be adapted to Laravel with minimal effort (e.g., wrapping the collection in a Laravel service).HttpFoundation, EventDispatcher) could require polyfills or abstraction layers, increasing complexity.Breadcrumbs::generate('path.to.route')) is non-trivial to replicate with this package, as it assumes Symfony’s router.Url::to() or route() helpers won’t align with Symfony’s UrlGenerator.spatie/laravel-breadcrumbs (10K+ stars) may be safer.ContainerInterface vs. Laravel’s Container/ServiceProvider.RouterInterface vs. Laravel’s Router/UrlGenerator.BreadcrumbCollection class) and wrap it in a Laravel service. Lose Symfony-specific features (e.g., event listeners).BreadcrumbCollection class (implementing ArrayAccess, IteratorAggregate, Countable).HttpFoundation, EventDispatcher).BreadcrumbManager) to instantiate and manage collections.class BreadcrumbManager {
public function create(): BreadcrumbCollection {
return new \ChamberOrchestra\Breadcrumbs\BreadcrumbCollection();
}
}
Blade::directive('breadcrumbs', function ($crumbs) {
return "<?php echo \$crumbs->render(); ?>";
});
UrlGenerator with Laravel’s Url::to() or route() in the collection’s getUrl() method.BreadcrumbCollection class in isolation.spatie/laravel-breadcrumbs).spatie/laravel-breadcrumbs has active support, 10K+ stars, and dedicated documentation.spatie/laravel-breadcrumbs offers zero ramp-up for Laravel teams, with built-in Blade support and route integration.How can I help you explore Laravel packages today?