PHPackages                             dluwang/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. dluwang/breadcrumb

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

dluwang/breadcrumb
==================

PHP Breadcrumb builder service

v2.0.0(6y ago)03[3 issues](https://github.com/inologi/breadcrumb/issues)[3 PRs](https://github.com/inologi/breadcrumb/pulls)MITPHP

Since Jan 8Pushed 3y agoCompare

[ Source](https://github.com/inologi/breadcrumb)[ Packagist](https://packagist.org/packages/dluwang/breadcrumb)[ RSS](/packages/dluwang-breadcrumb/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (16)Used By (0)

**Breadcrumb**
==============

[](#breadcrumb)

[![Build Status](https://camo.githubusercontent.com/74263523b65f8686deb88fcefc87627c3d30e936a99c57b4fe6b33959d41a61a/68747470733a2f2f7472617669732d63692e6f72672f646c7577616e672f62726561646372756d622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dluwang/breadcrumb)[![Latest Stable Version](https://camo.githubusercontent.com/f349482ade28e29761657a765d946a3b1b66933f883b03c1a7c7755325888a52/68747470733a2f2f706f7365722e707567782e6f72672f646c7577616e672f62726561646372756d622f762f737461626c65)](https://packagist.org/packages/dluwang/breadcrumb)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

This is a package that provide service to build breadcrumb.

**Installation**
----------------

[](#installation)

Laravel VersionPackage Version5.51.0.\*5.61.1.\*5.71.2.\*5.81.3.\*^6.0^2.0**Installation**
----------------

[](#installation-1)

```
composer require dluwang/breadcrumb

```

**Usage**
---------

[](#usage)

**Define Navigation**`Dluwang/Breadcrumb/Crumb` is a class to define your crumb. The `__construct` method has three mandatory arguments and one optional arguments

```
public function __construct($id, $label, $url, Crumb $prev = null)
```

1. `$id` is the id of the crumb
2. `$label` is the label of the crumb
3. `$url` is the url of the crumb
4. `$prev` is the previous crumb of current crumb

All of the properties above can be accessed via the object instance.

**Registering previous crumb**There are two methods to register previous crumb.

- **Via constructor**

    `$crumb = new Crumb('the-id', 'the-lable', 'the-url', $prev);`
- **Via prev() method**`$crumb->prev($prevCrumb);`

**Cast to array**

```
$crumb->toArray();

results: [['crumb-1', 'crumb 1', '/crumb-1'], ['crumb-2', 'crumb 2', '/crumb-2']]
```

If your crumb is build in recursive manner, it will generate all of the prev crumb.

**Define Breadcrumb**
---------------------

[](#define-breadcrumb)

`Dluwang/Breadcrumb/Breadcrumb` is an interface that act as the repository of Crumb. All Breadcrumb implementation should implements `Dluwang/Breadcrumb/Breadcrumb` interface. Currently. this package provide in memory implementation which is located at `Dluwang/Breadcrumb/InMemoryBreadcrumb`.

```
$breadcrumb = new InMemoryBreadcrumb()
```

Constructor has one optional argument which is the crumbs that registered.

**Registering crumbs**

```
$breadcrumb->register($crumb) // single crumb registration
$navigator->register([$crumb1, $crumb2]) // mutiple crumbs
```

As mentioned above, the deferred child can be registered casually to navigator.

**Retrieve crumb by id**

```
$breadcrumb->crumb('crumb-id')
```

**Global previous crumb**

Sometimes you need to apply previous to all crumbs. Below is how to achieve that.

```
$global = new Crumb('the-id', 'the-label', 'the-url');
$breadcrumb->prev($global);
```

**Integration**
---------------

[](#integration)

Currently, this package only integrated with **laravel framework**. The integration only register default implementation binding (in memory implementation) and provide an alias.

#### **Tests**

[](#tests)

To run test, run this following command

```
vendor/bin/phpunit

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity68

Established project with proven stability

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.

###  Release Activity

Cadence

Every ~28 days

Recently: every ~70 days

Total

11

Last Release

2397d ago

Major Versions

v1.3.0 → v2.0.02019-10-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/86155a9709a56bf2ff58e7424d9ac9a1787aa8ae3612744771a393fa2bfb5668?d=identicon)[inologi](/maintainers/inologi)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[jofrysutanto/windsor

YAML-ised Configuration for ACF

549.2k](/packages/jofrysutanto-windsor)[jshannon63/jsoncollect

Supercharge your JSON using collections

154.9k1](/packages/jshannon63-jsoncollect)

PHPackages © 2026

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