PHPackages                             tabuna/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tabuna/breadcrumbs

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

tabuna/breadcrumbs
==================

An easy way to add breadcrumbs to your Laravel app.

4.4.0(2mo ago)4163.4M—8.3%19[12 issues](https://github.com/tabuna/breadcrumbs/issues)[1 PRs](https://github.com/tabuna/breadcrumbs/pulls)12MITPHPPHP ^8.1CI failing

Since Apr 24Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/tabuna/breadcrumbs)[ Packagist](https://packagist.org/packages/tabuna/breadcrumbs)[ RSS](/packages/tabuna-breadcrumbs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (24)Used By (12)

 [![Laravel Breadcrumbs](https://raw.githubusercontent.com/tabuna/breadcrumbs/master/laravel-breadcrumbs.svg)](https://raw.githubusercontent.com/tabuna/breadcrumbs/master/laravel-breadcrumbs.svg)

[![Tests](https://github.com/tabuna/breadcrumbs/workflows/run-tests/badge.svg)](https://github.com/tabuna/breadcrumbs/workflows/run-tests/badge.svg)[![codecov](https://camo.githubusercontent.com/0d400dc2bc1a66e0d7e81a48d0cafb64d34a94e548531474c54b2d99efe17c4b/68747470733a2f2f636f6465636f762e696f2f67682f746162756e612f62726561646372756d62732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/tabuna/breadcrumbs)[![Total Downloads](https://camo.githubusercontent.com/4c62c6e38b6e29c99d38e2ae851f99696181f3e647fc3ac2111bb69188013302/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746162756e612f62726561646372756d62732e737667)](https://packagist.org/packages/tabuna/breadcrumbs)[![Latest Version on Packagist](https://camo.githubusercontent.com/78801c55ce8a478bc8e2de4f0ca04cf9bf5ca08e98cb022b668c5f237c7ede87/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746162756e612f62726561646372756d62732e737667)](https://packagist.org/packages/tabuna/breadcrumbs)

Introduction
------------

[](#introduction)

Breadcrumbs display a list of links indicating the position of the current page in the whole site hierarchy. For example, breadcrumbs like `Home / Sample Post / Edit` means the user is viewing an edit page for the "Sample Post." He can click on "Sample Post" to view that page or click on "Home" to return to the homepage.

> [Home](#) / [Sample Post](#) / Edit

This package for the [Laravel framework](https://laravel.com/) will make it easy to build breadcrumbs in your application.

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

[](#installation)

Run this at the command line:

```
composer require tabuna/breadcrumbs
```

This will update `composer.json` and install the package into the `vendor/` directory.

Define your breadcrumbs
-----------------------

[](#define-your-breadcrumbs)

Now you can define breadcrumbs directly in the route files:

```
use Tabuna\Breadcrumbs\Trail;

// Home
Route::get('/', fn () => view('home'))
    ->name('home')
    ->breadcrumbs(fn (Trail $trail) =>
        $trail->push('Home', route('home'))
);

// Home > About
Route::get('/about', fn () => view('home'))
    ->name('about')
    ->breadcrumbs(fn (Trail $trail) =>
        $trail->parent('home')->push('About', route('about'))
);
```

You may also retrieve arguments from the request. Parameters are resolved by name:

```
Route::get('/category/{category}', function (Category $category) {
    // In this example, $category is an Eloquent model instance.
    // ...
})
    ->name('category')
    ->breadcrumbs(fn (Trail $trail, Category $category) =>
        $trail->push($category->title, route('category', $category->id))
);
```

Route detection
---------------

[](#route-detection)

The package tries to reduce the number of lines needed. For this, you can skip passing the results of the `route()` methods. The following two declarations will be equivalent:

```
Route::get('/', fn () => view('home'))
    ->name('home')
    ->breadcrumbs(fn (Trail $trail) =>
        $trail->push('Home', route('home'))
);

Route::get('/', fn () => view('home'))
    ->name('home')
    ->breadcrumbs(fn (Trail $trail) =>
        $trail->push('Home', 'home')
);
```

Like to use a separate route file?
----------------------------------

[](#like-to-use-a-separate-route-file)

You can do this simply by adding the desired file to the service provider

```
namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class BreadcrumbsServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application events.
     */
    public function boot(): void
    {
        require base_path('routes/breadcrumbs.php');
    }
}
```

Then it will be your special file in the route directory:

```
// routes/breadcrumbs.php

// Photos
Breadcrumbs::for('photo.index', fn (Trail $trail) =>
    $trail->parent('home')->push('Photos', route('photo.index'))
);
```

Route resource
--------------

[](#route-resource)

When using resources, a whole group of routes is declared for which you must specify values manually

```
// routes/web.php

Route::resource('photos', 'PhotoController');
```

It’s better to specify this in service providers, since route files can be cached

```
namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Tabuna\Breadcrumbs\Breadcrumbs;
use Tabuna\Breadcrumbs\Trail;

class BreadcrumbsServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        Breadcrumbs::for('photos.index', fn (Trail $trail) =>
             $trail->push('Photos', route('home'))
        );

        Breadcrumbs::for('photos.create', fn (Trail $trail) =>
            $trail
                ->parent('photos.index', route('photos.index'))
                ->push('Add new photo', route('home'))
        );
    }
}
```

Output the breadcrumbs use Blade Component
------------------------------------------

[](#output-the-breadcrumbs-use-blade-component)

You can use the output component:

```

```

To define classes of list items, you can specify:

```

```

You can also pass parameters:

```

```

And call named routes explicitly:

```

```

Output the breadcrumbs use Blade view
-------------------------------------

[](#output-the-breadcrumbs-use-blade-view)

In order to display breadcrumbs on the desired page, simply call:

```
@if(Breadcrumbs::has())
    @foreach (Breadcrumbs::current() as $crumbs)
        @if ($crumbs->url() && !$loop->last)

                    {{ $crumbs->title() }}

        @else

                {{ $crumbs->title() }}

        @endif
    @endforeach
@endif
```

And results in this output:

> [Home](#) / About

Credits
-------

[](#credits)

For several years, I successfully used the [Dave James Miller](https://github.com/davejamesmiller/laravel-breadcrumbs) package to solve my problems, but he stopped developing and supporting it. After a long search for alternatives, I liked the [Dwight Watson](https://github.com/dwightwatson) package, but the isolation of breadcrumbs from the announcement of the routes did not give me rest. That's why I created this package. It uses the code of both previous packages.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity61

Solid adoption and visibility

Community28

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

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

###  Release Activity

Cadence

Every ~102 days

Recently: every ~183 days

Total

22

Last Release

61d ago

Major Versions

1.3.1 → 2.0.02020-09-08

2.4.0 → 3.0.02022-02-04

3.0.0 → 4.0.02023-02-17

PHP version history (3 changes)2.4.0PHP ^7.4|^8.0

3.0.0PHP ^8.0

4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c47797b11041f37c2eec74b09bc6619c8997467d690797ebad0e6ab7cb232b7?d=identicon)[tabuna](/maintainers/tabuna)

---

Top Contributors

[![tabuna](https://avatars.githubusercontent.com/u/5102591?v=4)](https://github.com/tabuna "tabuna (79 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (5 commits)")[![juliomotol](https://avatars.githubusercontent.com/u/21353103?v=4)](https://github.com/juliomotol "juliomotol (2 commits)")[![danielh-official](https://avatars.githubusercontent.com/u/49914607?v=4)](https://github.com/danielh-official "danielh-official (1 commits)")[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (1 commits)")

---

Tags

breadcrumbbreadcrumbshacktoberfestlaravellaravel-breadcrumbs

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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