PHPackages                             nomiscz/laravel-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. nomiscz/laravel-breadcrumbs

ActiveLibrary

nomiscz/laravel-breadcrumbs
===========================

Breadcrumbs made easy for Laravel.

v1.0.0(5y ago)16MITPHPPHP ^7.2CI failing

Since Jun 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/NomisCZ/laravel-breadcrumbs)[ Packagist](https://packagist.org/packages/nomiscz/laravel-breadcrumbs)[ RSS](/packages/nomiscz-laravel-breadcrumbs/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Breadcrumbs for Laravel \[Fork\]
================================

[](#breadcrumbs-for-laravel-fork)

[![Latest Stable Version](https://camo.githubusercontent.com/d82ce39d8d10835fcb302a01ea5e5fdc9a35217fbbff492ed257950ad6f563d6/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6d6973637a2f6c61726176656c2d62726561646372756d62732f76)](//packagist.org/packages/nomiscz/laravel-breadcrumbs)[![Total Downloads](https://camo.githubusercontent.com/f73b1f6feab16ef6d0dd1add6f40a13002be4498ccd92a50a5904e031250f13b/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6d6973637a2f6c61726176656c2d62726561646372756d62732f646f776e6c6f616473)](//packagist.org/packages/nomiscz/laravel-breadcrumbs)[![License](https://camo.githubusercontent.com/db1f05abef45df504a90c6855bc5d1507a937f59e1a7d59bdcf234b645dcfcd5/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6d6973637a2f6c61726176656c2d62726561646372756d62732f6c6963656e7365)](//packagist.org/packages/nomiscz/laravel-breadcrumbs)

Breadcrumbs is a simple breadcrumb generator for Laravel that tries to hook into the magic to make it easy to get up and running. It ships with support for Bootstrap 3 and 4 (with 4 the default) but it's easy to drop in your own view instead.

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

[](#installation)

Require the package through Composer as per usual.

```
$ composer require nomiscz/laravel-breadcrumbs
```

Usage
-----

[](#usage)

Create a new file at `routes/breadcrumbs.php` to define your breadcrumbs. By default the package will work with named routes which works with resourceful routing. However, you're also free to define routes by the controller action/pair.

```
Breadcrumbs::for('admin.pages.index', function ($trail) {
    $trail->add('Admin', route('admin.pages.index'));
});

Breadcrumbs::for('admin.users.index', function ($trail) {
    $trail->parent('admin.pages.index');
    $trail->add('Users', route('admin.users.index'));
});

Breadcrumbs::for('admin.users.show', function ($trail, User $user) {
    $trail->parent('admin.users.index');
    $trail->add($user->full_name, route('admin.users.show', $user));
});

Breadcrumbs::for('admin.users.edit', function ($trail, User $user) {
    $trail->parent('admin.users.show', $user);
    $trail->add('Edit', route('admin.users.edit', $user));
});

Breadcrumbs::for('admin.users.roles.index', function ($trail, User $user) {
    $trail->parent('admin.users.show', $user);
    $trail->add('Roles', route('admin.users.roles.index', $user));
});

Breadcrumbs::for('admin.users.roles.show', function ($trail, User $user, Role $role) {
    $trail->parent('admin.users.roles.index', $user, $role);
    $trail->add('Edit', route('admin.users.roles.show', [$user, $role]));
});
```

Note that you can call `parent()` from within a breadcrumb definition which lets you build up the breadcrumb tree. Pass any parameters you need further up through the second parameter.

If you want to use controller/action pairs instead of named routes that's fine too. Use the usual Laravel syntax and the package will correctly map it up for you. Note that if the route is named the package will always looked for a named breadcrumb first.

```
Breadcrumbs::for('PagesController@getIndex', function ($trail) {
    $trail->add('Home', action('PagesController@getIndex'));
});

Breadcrumbs::for('secret.page', function ($trail) {
    $trail->add('Secret page', url('secret'))
});
```

### Rendering the breadcrumbs

[](#rendering-the-breadcrumbs)

In your view file, you simply need to call the `render()` method wherever you want your breadcrumbs to appear. It's that easy. If there are no breadcrumbs for the current route, then nothing will be returned.

```
{{ Breadcrumbs::render() }}
```

You don't need to escape the content of the breadcrumbs, it's already wrapped in an instance of `Illuminate\Support\HtmlString` so Laravel knows just how to use it.

### Multiple breadcrumb files

[](#multiple-breadcrumb-files)

If you find that your breadcrumbs files is starting to get a little bigger you may like to break it out into multiple, smaller files. If that's the case you can simply `require` other breadcrumb files at the top of your default definition file.

```
require 'breadcrumbs.admin.php';
```

### Customising the breadcrumb view

[](#customising-the-breadcrumb-view)

The package ships with a Bootstrap 3 compatible view which you can publish and customise as you need, or override completely with your own view. Simply run the following command to publish the view.

```
$ php artisan vendor:publish --provider="NomisCZ\Breadcrumbs\BreadcrumbsServiceProvider" --tag=views
```

This will publish the default `bootstrap4` view to your `resources/views/vendor/breadcrumbs` directory from which you can edit the file to your heart's content. If you want to use your own view instead, run the following command to publish the config file.

```
$ php artisan vendor:publish --provider="NomisCZ\Breadcrumbs\BreadcrumbsServiceProvider" --tag=config
```

This will publish `config/breadcrumbs.php` which provides you the option to set your own view file for your breadcrumbs.

Credits
-------

[](#credits)

Original author of this package is [Dwight Watson](https://github.com/dwightwatson/breadcrumbs). This package is inspired by the work of [Dave James Miller](https://github.com/davejamesmiller/laravel-breadcrumbs), which I've used for some time. It has been re-written by scratch for my use case with a little more magic and less customisation, plus taking advantage of some newer features in PHP. Many thanks to Dave for his work.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

2143d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ec35604c308707c6fd16f5a6bf59bc1bc65c3f381effaafa09d127c472b0e19?d=identicon)[NomisCZ](/maintainers/NomisCZ)

---

Top Contributors

[![NomisCZ](https://avatars.githubusercontent.com/u/7500606?v=4)](https://github.com/NomisCZ "NomisCZ (5 commits)")[![Javierko](https://avatars.githubusercontent.com/u/33197433?v=4)](https://github.com/Javierko "Javierko (1 commits)")

---

Tags

laravelbreadcrumbs

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[glhd/gretel

270305.7k4](/packages/glhd-gretel)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)

PHPackages © 2026

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