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.
Pros:
Trail::call() visibility change (private) prevents misuse of internal methods, reducing risk of unintended side effects in custom generators.hasMacro guard protects against accidental macro overwrites, improving stability in large codebases.Cons:
Trail::call() is now private, which may break custom generators extending Trail directly. Workarounds exist (e.g., using app()->call()), but require refactoring.app()->call()). Impact is negligible for most use cases but could matter in micro-optimized generators.Trail::call() or named parameter adoption, increasing onboarding friction.route('posts.show', ['post' => $post]) → route('posts.show', $post)).Post vs. Comment) benefit from type-hinted parameters.Trail::call() directly must migrate to app()->call() or alternative patterns (e.g., dependency injection via constructor).Trail::call() may need significant refactoring.5.x in composer.json to avoid unintended upgrades during dependency resolution.Cache::tags('breadcrumbs')). Review caching strategies post-upgrade.hasMacro guard reduces risks, custom generators could still introduce vulnerabilities if they accept untrusted input (e.g., user-provided route parameters).Registrar::get() exceptions suggests robustness, but custom error handling may still be needed for production-grade apps.Trail::call() directly? What’s the effort to refactor to app()->call() or alternative patterns?Breadcrumbs macros? The hasMacro guard may affect existing functionality.posts/{post}/comments/{comment}).Trail::call() changes are incompatible.Trail::call() or positional arguments.Trail::call().fn($trail, $id)).Breadcrumbs.fn(Trail $trail, Post $post)).Trail::call() usage to app()->call() or dependency injection via constructor.php artisan test --filter=Breadcrumbs).breadcrumbs() fluent interface (if leveraging macro improvements).tabuna/breadcrumbs:^5.0 in composer.json to avoid unintended upgrades.Post $post resolves automatically).@include('breadcrumbs::breadcrumbs').BreadcrumbsMiddleware improvements (e.g., forgetParameter) align with Laravel 10+ routing.Post model resolves cleanly in React/Vue).Trail::call(): Use app()->call() or create a wrapper service to abstract the change....$args for backward compatibility (not recommended long-term).composer.json to pin tabuna/breadcrumbs:^5.0.php artisan vendor:publish --tag=breadcrumbs --force.php artisan test --filter=Breadcrumbs.app()->call().route('posts.show', ['post' => $post]) → route('posts.show', $post)).Trail::call() being private reduces surface area for misuse.How can I help you explore Laravel packages today?