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

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

aelora/laravel-breadcrumbs
==========================

Quick and easy breadcrumbs for Laravel

0.1.0(3y ago)017MITPHPPHP ^8.1

Since Jul 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/RyanNutt/laravel-breadcrumbs)[ Packagist](https://packagist.org/packages/aelora/laravel-breadcrumbs)[ Docs](https://github.com/RyanNutt/laravel-breadcrumbs)[ GitHub Sponsors](https://github.com/RyanNutt)[ RSS](/packages/aelora-laravel-breadcrumbs/feed)WikiDiscussions main Synced 1mo ago

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

[![](./.github/laravel-breadcrumbs.png)](./.github/laravel-breadcrumbs.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/25c18e074a1a0ecce79be796b5f3584f7b3852968659e986e747f79e2982602c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61656c6f72612f6c61726176656c2d62726561646372756d62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aelora/laravel-breadcrumbs)[![Total Downloads](https://camo.githubusercontent.com/d6ef542835fdb19616d4408e6035ab2d1b2b7d7222874ebd1e47905597f25377/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61656c6f72612f6c61726176656c2d62726561646372756d62732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aelora/laravel-breadcrumbs)

Quickly build breadcrumb trails for your pages in Laravel and automatically output the HTML and JSON-LD schema metadata.

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

[](#installation)

You can install the package via composer:

```
composer require aelora/laravel-breadcrumbs
```

You can publish the config file with:

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

This is the contents of the published config file:

```
return [
    'home' => [

        // Should the home link be automatically included in the breadcrumbs? You can also manually include
        // or exclude the home link when you build the breadcrumb class.
        'include' => true,

        'text' => 'Home',

        'url' => url('/'),

        'image' => '',
    ],

    // Which blade template to use. Currently only tailwind is supported.
    'theme' => 'tailwind',

    // View to use to generate the HTML breadcrumbs. If defined, this will
    // override the theme above.
    'view' => '',

    // Character to use as a separator between crumbs. Use and encoded entity
    // if you want something like >
    'separator' => '/',
];
```

Optionally, you can publish the views using

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

Currently the only two views are `jsonld.blade.php` which is used for the Schema metadata and `breadcrumbs-tailwind.blade.css`.

Usage
-----

[](#usage)

```
// In your controller
use Aelora\Breadcrumbs\Breadcrumbs;
$breadcrumbs = Breadcrumbs::create()
    ->add('Page #1', url('/page-1'))
    ->add('Page #2', url('/page-2'))
    ->add('Current Page');

return view('some.view.file', ['breadcrumbs' => $breadcrumbs]);
```

```
// In your view where ever your want the breadcrumbs
{!! $breadcrumbs !!}
```

You can also call `$breadcrumbs->generate()` for the same effect. `Breadcrumbs` implements `Stringable` and has a `__toString()` method, so you don't need to. The `__toString()` calls `generate()`.

Note that we're using `{!!` and `!!}` instead of `{{` and `}}`. We don't want the contents of the breadcrumbs to be escaped.

### Home Page

[](#home-page)

You don't need to explicitly add your home page to the breadcrumbs. With the default config, it will be added automatically as the first element before output. If you don't want to include the home page link you can set `home.include` to `false` in the config file or call `setHome(false)` when you're creating the breadcrumbs.

Methods
-------

[](#methods)

`public function add(string $title, string $url = '', string $image = '')`

Adds a new breadcrumb link on the end of the current stack.

The only required parameter is `$title`. Breadcrumbs will only be links if `$url` is not empty. If it is, `$title` will display unlinked. `$image` is a link to an image for the breadcrumb. It's currently only used in the schema metadata and not in the visible HTML output, although it could be if you build your own view.

`public function count()`

Returns the number of breadcrumb items, not counting the home link.

`public static function create()`

Returns a new instance so you can build on one line without having to call `new Breadcrumbs()`.

`public function generate($echo = false)`

Returns the generated breadcrumbs, both the visible HTML and schema metadata. If `$echo` is `true` then the breadcrumbs will also be echoed prior to return.

`public function reset()`

Clears the breadcrumb trail.

`public function reverse()`

Reverses the internal breadcrumb trail. Sometimes it's easier to build the trail backwards and then flip it at the end.

`public function setHome($title, string $url = '', string $image = '')`

Allows you to change the home link for individual pages without having to change the config file. Parameters are the same as the `add` method.

If `$title` is `false` then the home link will not be included. Otherwise it should be a `string`.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/RyanNutt/.github/blob/main/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Ryan Nutt](https://github.com/RyanNutt)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

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

1401d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/735c35e3efe6a08bafaf3b7ca05445de2244b9ffee4aa73f1b7fb8a1e3683c7c?d=identicon)[ryannutt](/maintainers/ryannutt)

---

Top Contributors

[![RyanNutt](https://avatars.githubusercontent.com/u/7416974?v=4)](https://github.com/RyanNutt "RyanNutt (7 commits)")

---

Tags

laravellaravel-packagephplaravellaravel-breadcrumbsaelora

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M626](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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