PHPackages                             atstudio-tech/breadcrumbs - 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. [Templating &amp; Views](/categories/templating)
4. /
5. atstudio-tech/breadcrumbs

ActiveLibrary[Templating &amp; Views](/categories/templating)

atstudio-tech/breadcrumbs
=========================

A simple breadcrumbs package for Laravel, with support for Blade and Inertia.js.

3.1.0(1mo ago)11851MITPHPPHP &gt;=8.3

Since Mar 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/vixen-tech/laravel-breadcrumbs)[ Packagist](https://packagist.org/packages/atstudio-tech/breadcrumbs)[ RSS](/packages/atstudio-tech-breadcrumbs/feed)WikiDiscussions main Synced 5d ago

READMEChangelog (5)Dependencies (7)Versions (7)Used By (0)

Laravel Breadcrumbs
===================

[](#laravel-breadcrumbs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/36f797af12937640b5a13e4e25d7962defad654e71f63f60eef662fde9ae5265/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766978656e2f6c61726176656c2d62726561646372756d62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vixen/laravel-breadcrumbs)[![Total Downloads](https://camo.githubusercontent.com/2edef33da5857fffd96fc9a1e6ada6a006b49c6d5bd72719a52cfb013ae74fca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766978656e2f6c61726176656c2d62726561646372756d62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vixen/laravel-breadcrumbs)

A simple breadcrumbs package for Laravel, with support for Blade and Inertia.js.

```
// In your controller
crumbs('Posts', '/posts')->add('Show Post', route('posts.show', $post));
```

```

@crumbs
```

```
// In your Inertia component

```

Installation
------------

[](#installation)

```
composer require vixen/laravel-breadcrumbs
```

The service provider is auto-discovered. To publish the config and views:

```
php artisan vendor:publish --tag="breadcrumbs-config"
php artisan vendor:publish --tag="breadcrumbs-views"
```

Quick Start
-----------

[](#quick-start)

Add breadcrumbs from your controller or routes file, then render them in your view.

### Adding Breadcrumbs

[](#adding-breadcrumbs)

From a controller:

```
public function show(Post $post)
{
    crumbs('Posts', '/posts')->add($post->title, route('posts.show', $post));
}
```

From your routes file:

```
Route::get('posts', [PostController::class, 'index'])->crumbs(function (Breadcrumbs $crumbs) {
    $crumbs->add('Posts', '/posts');
});
```

### Rendering

[](#rendering)

In Blade, use the `@crumbs` directive or call `render()` directly:

```
@crumbs

{{-- or with a custom view --}}
@crumbs(breadcrumbs::custom-view)
```

For Inertia.js, the breadcrumbs are available as a JSON-serializable array via `crumbs()->toArray()` or `crumbs()->toJson()`.

Usage
-----

[](#usage)

### Notations

[](#notations)

There are three interchangeable ways to interact with breadcrumbs:

**Helper function** (recommended):

```
crumbs('Home', '/')->add('About', '/about');
```

**Facade:**

```
use Vixen\Breadcrumbs\Facades\Crumbs;

Crumbs::add('Home', '/');
```

**Dependency injection:**

```
use Vixen\Breadcrumbs\Breadcrumbs;

public function index(Breadcrumbs $crumbs)
{
    $crumbs->add('Home', '/');
}
```

### Options Array

[](#options-array)

Instead of separate arguments, you can pass an associative array:

```
crumbs([
    'title' => 'Posts',
    'path' => '/posts',
    'extra' => ['icon' => 'newspaper'],
]);
```

### Multi-Item Positions

[](#multi-item-positions)

A position in the trail can hold multiple items by passing a sequential array. This is useful for rendering a dropdown selector instead of a single link:

```
// Home > [Electronics | Clothing | Books] > Product Name
crumbs('Home', '/')
    ->add([
        ['title' => 'Electronics', 'path' => '/categories/electronics'],
        ['title' => 'Clothing', 'path' => '/categories/clothing'],
        ['title' => 'Books', 'path' => '/categories/books'],
    ])
    ->add($product->name, route('products.show', $product));
```

When iterating, a multi-item position is an array of `Breadcrumb` objects rather than a single one. Each item independently tracks its own `active` state.

### Custom Views

[](#custom-views)

Publish the views and edit them, or create your own. The default view (`breadcrumbs::plain`):

```

        @foreach ($breadcrumbs as $breadcrumb)
            @if (!$loop->first)
                /
            @endif

            @if ($breadcrumb->active)
                {{ $breadcrumb->title }}
            @else

                        {{ $breadcrumb->title }}

            @endif
        @endforeach

```

You can specify a different view globally in `config/breadcrumbs.php` or per-render:

```
crumbs()->render('breadcrumbs::custom-view')
```

API
---

[](#api)

### `Breadcrumbs::add(string|array $title, ?string $path = null, array $extra = [])`

[](#breadcrumbsaddstringarray-title-string-path--null-array-extra--)

ParameterTypeDescription`$title``string|array`The breadcrumb label, an options array, or a list of options arrays`$path``?string`A URL string. `null` means no link.`$extra``array`Arbitrary extra data attached to the breadcrumb.When `$title` is an associative array, it is treated as a single breadcrumb with keys `title`, `path` (optional), and `extra` (optional).

When `$title` is a sequential array, each element is an options array and the items are grouped at a single position in the trail.

### `crumbs(string|array|callable|null $title = null, ?string $path = null, array $extra = [])`

[](#crumbsstringarraycallablenull-title--null-string-path--null-array-extra--)

Same as `Breadcrumbs::add()`, but also accepts a callable and returns the `Breadcrumbs` instance. Called without arguments, it simply returns the instance.

### `Breadcrumb` Properties

[](#breadcrumb-properties)

PropertyTypeDescription`title``string`The breadcrumb label.`path``?string`The URL, or `null` if none was provided.`active``bool``true` when `path` matches the current URL.`extra``array`Arbitrary extra data.Changelog
---------

[](#changelog)

See [CHANGELOG](CHANGELOG.md) for all changes.

Contributing
------------

[](#contributing)

See [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Alex Torscho](https://github.com/atorscho)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. See [LICENSE](LICENSE.md) for details.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance90

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 97.2% 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.

###  Release Activity

Cadence

Every ~371 days

Total

5

Last Release

45d ago

PHP version history (3 changes)v3.0.0PHP ^8.1

v3.0.3PHP &gt;=8.1

3.1.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/05ca9e5f22ddfbacac280fe76010f41a245cce7916d37ba5ad5d6b873ad63f29?d=identicon)[atorscho](/maintainers/atorscho)

---

Top Contributors

[![atorscho](https://avatars.githubusercontent.com/u/7644596?v=4)](https://github.com/atorscho "atorscho (35 commits)")[![pionl](https://avatars.githubusercontent.com/u/1878831?v=4)](https://github.com/pionl "pionl (1 commits)")

---

Tags

laravelbladeinertianavigationbreadcrumbs

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/atstudio-tech-breadcrumbs/health.svg)

```
[![Health](https://phpackages.com/badges/atstudio-tech-breadcrumbs/health.svg)](https://phpackages.com/packages/atstudio-tech-breadcrumbs)
```

###  Alternatives

[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[stijnvanouplines/blade-country-flags

A package to easily make use of country flags in your Laravel Blade views.

26307.2k6](/packages/stijnvanouplines-blade-country-flags)[technikermathe/blade-lucide-icons

A package to easily make use of Lucide icons in your Laravel Blade views.

18299.2k7](/packages/technikermathe-blade-lucide-icons)[saade/blade-iconsax

A package to easily make use of Iconsax in your Laravel Blade views.

21138.5k](/packages/saade-blade-iconsax)[mckenziearts/blade-untitledui-icons

A package to easily make use of UntitledUI icons in your Laravel Blade views.

16104.9k5](/packages/mckenziearts-blade-untitledui-icons)

PHPackages © 2026

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