Package No Longer Supported
The Laravel Breadcrumbs package is no longer supported and will not receive further updates or bug fixes. You are advised to migrate to an alternative solution.
Troubleshooting
General
- Re-read the documentation and make sure you did everything correctly
- Start with the simple options and only use the advanced options (e.g. Route-Bound Breadcrumbs) once you understand how it works
Class 'Breadcrumbs' not found
- Try running
php artisan package:discoverto ensure the service provider is detected by Laravel
Breadcrumb not found with name ...
- Make sure you register the breadcrumbs in the right place (
routes/breadcrumbs.phpby default)- Try putting
dd(__FILE__)in the file to make sure it's loaded. - Try putting
dd($files)inBreadcrumbsServiceProvider::registerManager()to check the path is correct - If not, try running
php artisan config:clear(or manually deletebootstrap/cache/config.php) or update the path(s) inconfig/breadcrumbs.php
- Try putting
- Make sure the breadcrumb name is correct
- If using Route-Bound Breadcrumbs, make sure it matches the route name
- To suppress these errors when using Route-Bound Breadcrumbs (if you don't want breadcrumbs on some pages), either:
- Register them with an empty closure (no push/parent calls), or
- Set
missing-route-bound-breadcrumb-exceptiontofalsein the config file to disable the check (but you won't be warned if you miss any pages)
BreadcrumbsServiceProvider Throws FileNotFoundException
- Make sure the path is correct
- If so, check the file ownership & permissions are correct
- If not, try running
php artisan config:clear(or manually deletebootstrap/cache/config.php) or update the path(s) inconfig/breadcrumbs.php
Undefined variable: breadcrumbs in view file
- Make sure you use
{{ Breadcrumbs::render() }}or{{ Breadcrumbs::view() }}, not@include()- If you do manually
@include()a breadcrumbs view, ensure you pass the breadcrumb collection into it
- If you do manually