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

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

mj/breadcrumb
=============

A simple breadcrumb generator for Laravel 4

116.3k5PHP

Since Nov 17Pushed 11y ago2 watchersCompare

[ Source](https://github.com/mjanssen/Laravel-4-breadcrumb)[ Packagist](https://packagist.org/packages/mj/breadcrumb)[ RSS](/packages/mj-breadcrumb/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel 4 Breadcrumbs
=====================

[](#laravel-4-breadcrumbs)

\*\* If you have problems running setSeperator (typo'd) after update, I changed the function name to setSeperator.

A small and easy customizable breadcrumb generator for Laravel 4.

edit the .json
==============

[](#edit-the-json)

Edit your .json file and add the following line to your "require"

`"mj/breadcrumb": "dev-master"`

After this run the `composer update` to update your framework and get the breadcrumb class loaded into your files.

Setup
=====

[](#setup)

Open app.php in your config folder

1. Add the line `'Mj\Breadcrumb\BreadcrumbServiceProvider'` to the providers array.
2. To make use of the Facade that comes with Laravel 4, make sure you register the alias in the file 'app/config/app.php'.

Like this: `'Breadcrumb'      => 'Mj\Breadcrumb\Facades\breadcrumb'`

Usage
=====

[](#usage)

To create breadcrumbs use the following code:

`Breadcrumb::addbreadcrumb('linkname', 'url');`

You can add multiple breadcrumbs by repeating the code above.

To set an seperator you can use:

`Breadcrumb::setSeparator('yourseperator')`

At last send your breadcrumbs to your template (or just generate them) with the following command:

`Breadcrumb::generate()`

Example
=======

[](#example)

Note: Use real url's (like /this/page) and not Laravel's URL helper. Not setting a URL at all will also work.

```
//Controller

public function page()
{
  //Those are required to set some breadcrumbs first.
  Breadcrumb::addBreadcrumb('home', '/');
  Breadcrumb::addBreadcrumb('some page', '/some-page');
  Breadcrumb::addBreadcrumb('last piece'); //Does not need a url because it's the last breadcrumb segment

	Breadcrumb::setSeparator('/'); //Set some seperator you think is nicest (not required)

  $data = array(
	  'breadcrumbs' => Breadcrumb::generate() //Breadcrumbs UL is generated and stored in an array.
  )

  //return the view with the $data array to use it in the view
  return View::make('some/page', $data);
}

//View

{{$breadcrumbs}} // -> UL with list-items with the links :)

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/f28c974665fb7081bf5f820421781cbf73478074949bc5d6923487702dad7228?d=identicon)[mjanssen](/maintainers/mjanssen)

---

Top Contributors

[![mjanssen](https://avatars.githubusercontent.com/u/1145427?v=4)](https://github.com/mjanssen "mjanssen (16 commits)")[![drmonkeyninja](https://avatars.githubusercontent.com/u/357623?v=4)](https://github.com/drmonkeyninja "drmonkeyninja (2 commits)")

### Embed Badge

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

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

PHPackages © 2026

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