mrshanebarron/breadcrumbs
A simple Laravel package for building and rendering breadcrumb trails from routes, URLs, or custom definitions. It provides a clean API and Blade-friendly output for consistent hierarchical navigation across your application.
composer require <vendor>/<package>
php artisan vendor:publish --tag=sb-config
sb- prefix, for example:
config/sb-package.php
php artisan config:clear
config/sb-*.php for credentials, defaults, and feature flags.A good first use case is a single read/write flow through the package’s main service: configure the sb- config file with environment-backed values, resolve the service from the container, perform one operation, and assert the result in a feature test.
config/sb-*.php with safe defaults and use SB_* environment variables for secrets and per-environment values.public function __construct(private PackageService $service) {}
sb- config keys in setUp() or phpunit.xml rather than mocking internal classes:
config(['sb-package.driver' => 'fake']);
vendor/; publish and override.sb- config, run:
php artisan config:cache
sb- prefix. If you published config under v1.0.0, the package may no longer read that file. Re-publish the config, compare it with your old file, and remove or rename the stale config.php artisan vendor:publish --tag=sb-config --force
php artisan config:clear
php artisan config:clear locally and php artisan config:cache in deployment. A stale cached config can make it appear that the new sb- file is not loaded.config/, so a leftover pre-fix config can create duplicate or misleading keys. Remove it after migrating values.php artisan tinker
>>> config('sb-package')
Also confirm the service provider is registered with php artisan about.vendor/ or bootstrap/cache/ directory.How can I help you explore Laravel packages today?