PHPackages                             step2dev/lazy-breadcrumb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. step2dev/lazy-breadcrumb

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

step2dev/lazy-breadcrumb
========================

A simple, convenient, and flexible package for generating breadcrumbs in Laravel — minimal code, maximum flexibility, and automation.

092[4 PRs](https://github.com/step2dev/lazy-breadcrumb/pulls)PHPCI passing

Since Oct 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/step2dev/lazy-breadcrumb)[ Packagist](https://packagist.org/packages/step2dev/lazy-breadcrumb)[ RSS](/packages/step2dev-lazy-breadcrumb/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

🧭 Lazy Breadcrumb [![License: MIT](https://camo.githubusercontent.com/a8f88961d5dac41de57e32694acaae2164898c90f637bb70f3efdd3bc77fef52/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73746570326465762f6c617a792d62726561646372756d623f7374796c653d666c61742d737175617265)](LICENSE.md) [![Contributors](https://camo.githubusercontent.com/24795eddd3ff81b651e7fba42394baa49462eb0d153b0c9203284849a43bd7f8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f73746570326465762f6c617a792d62726561646372756d622e7376673f7374796c653d666c61742d737175617265)](https://github.com/step2dev/lazy-breadcrumb/graphs/contributors) [![Packagist PHP Version](https://camo.githubusercontent.com/45f0811d055e97093612805961e9729c4021aff208cdaf308d295f47afaee107/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73746570326465762f6c617a792d62726561646372756d622f706870)](https://camo.githubusercontent.com/45f0811d055e97093612805961e9729c4021aff208cdaf308d295f47afaee107/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73746570326465762f6c617a792d62726561646372756d622f706870) [![Packagist Laravel Version](https://camo.githubusercontent.com/6f0305b567d7ebbd046b1a49ad2f4a5c24a42582de8554cd1f5b2e041ec17199/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73746570326465762f6c617a792d62726561646372756d622f696c6c756d696e6174652f636f6e747261637473)](https://camo.githubusercontent.com/6f0305b567d7ebbd046b1a49ad2f4a5c24a42582de8554cd1f5b2e041ec17199/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73746570326465762f6c617a792d62726561646372756d622f696c6c756d696e6174652f636f6e747261637473)
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-lazy-breadcrumb----)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e754e666ca97879b33a400d0ae507b98b40eff7f60c23ba6902d0ed79a39cb10/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746570326465762f6c617a792d62726561646372756d622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/step2dev/lazy-breadcrumb)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3ede037f74638b94067a99ca76dfa22b38759d056df346573ef3c2849a06f71b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73746570326465762f6c617a792d62726561646372756d622f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/step2dev/lazy-breadcrumb/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/1391a5504bd490529983b355a2e467dd0ad91c35262c89c0cecd170b8f4aa39a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73746570326465762f6c617a792d62726561646372756d622f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/step2dev/lazy-breadcrumb/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![PHPStan](https://github.com/step2dev/lazy-breadcrumb/actions/workflows/phpstan.yml/badge.svg)](https://github.com/step2dev/lazy-breadcrumb/actions/workflows/phpstan.yml)[![Total Downloads](https://camo.githubusercontent.com/84cd328a2f9221e111de9226e0797c563ef693c9a1c6fc636dbd98c8de6e82d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746570326465762f6c617a792d62726561646372756d622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/step2dev/lazy-breadcrumb)

> A modern, developer-first breadcrumb generator for Laravel with Blade components, SEO-ready JSON-LD, Artisan tooling, and flexible DSL/macros.

---

🚀 Installation
--------------

[](#-installation)

```
composer require step2dev/lazy-breadcrumb
```

### Optional: Publish config and views

[](#optional-publish-config-and-views)

```
php artisan vendor:publish --tag=lazy-breadcrumb-config
php artisan vendor:publish --tag=lazy-breadcrumb-views
```

---

✨ Features
----------

[](#-features)

- `Breadcrumbs::for()` API
- Blade components (``, ``)
- Auto-title support: `$trail->model($model)`
- Custom push: `$trail->push('Title', 'url')`
- Replacing last item: `$trail->replaceLast('New Title')`
- Copy parent trail: `$trail->import([...])`
- Macro support: `Breadcrumbs::macro('key', fn ($trail) => ...)`
- SEO-ready: JSON-LD output for search engines
- Auto-discovery: optional `route:breadcrumbs:sync`
- Full Artisan tooling

---

📌 Defining Breadcrumbs
----------------------

[](#-defining-breadcrumbs)

Create a `routes/breadcrumbs.php` file:

```
use Step2dev\LazyBreadcrumb\Breadcrumbs;
use Step2dev\LazyBreadcrumb\Breadcrumbs\Trail;

Breadcrumbs::for('dashboard', function (Trail $trail) {
    $trail->push(__('Dashboard'), route('dashboard'));
});

Breadcrumbs::for('profile', function (Trail $trail) {
    $trail->push(__('Dashboard'), route('dashboard'))
          ->push(__('Profile'), route('profile'));
});
```

You can also use:

```
$trail->model($user); // Auto title from $user->name, title, or slug
$trail->replaceLast('Editing');
$trail->import([...]); // Reuse a parent breadcrumb
```

---

🧩 Blade Components
------------------

[](#-blade-components)

Use directly in any view:

```

 {{-- SEO only --}}
```

To customize the view, publish and modify `resources/views/components/breadcrumbs.blade.php`.

---

🧪 Artisan Commands
------------------

[](#-artisan-commands)

CommandDescription`make:breadcrumb name`Add breadcrumb entry to `routes/breadcrumbs.php``breadcrumbs:list`List all route-to-breadcrumb matches`breadcrumbs:list --missing`Show named routes without breadcrumbs`breadcrumbs:test`Run tests against all definitions`route:breadcrumbs:sync`Autogenerate missing breadcrumb stubs---

🧠 View Sharing
--------------

[](#-view-sharing)

To make breadcrumbs available globally:

```
// Middleware registration
\Step2dev\LazyBreadcrumb\Middleware\ShareBreadcrumbs::class
```

Then in views:

```
@foreach ($breadcrumbs as $crumb)
    {{ $crumb['title'] }}
@endforeach
```

---

📦 Preset (Optional)
-------------------

[](#-preset-optional)

Register the service provider:

```
\Step2dev\LazyBreadcrumb\LazyBreadcrumbPresetServiceProvider::class
```

Then run:

```
php artisan preset lazy-breadcrumb
```

---

🧪 Testing
---------

[](#-testing)

```
composer test
```

---

📝 License
---------

[](#-license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance58

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 84.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b91116cc6cf93ad52f0fa6096fcefa999f72ab67e74b3edfd27e2c3c1e1cd9b9?d=identicon)[CrazyBoy49z](/maintainers/CrazyBoy49z)

---

Top Contributors

[![CrazyBoy49z](https://avatars.githubusercontent.com/u/3448603?v=4)](https://github.com/CrazyBoy49z "CrazyBoy49z (39 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/step2dev-lazy-breadcrumb/health.svg)

```
[![Health](https://phpackages.com/badges/step2dev-lazy-breadcrumb/health.svg)](https://phpackages.com/packages/step2dev-lazy-breadcrumb)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
