evomase / laracrumbs by evomase

A light way of adding breadcrumbs to a route in Laravel
Package Data
Maintainer Username: evomase
Maintainer Contact: david.ogilo@dayesoft.co (David Ogilo)
Package Create Date: 2017-05-18
Package Last Update: 2017-07-24
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2023-12-01 15:07:49
Package Statistics
Total Downloads: 13
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0


Laracrumbs is a lightweight Laravel package that provides the functionality to add Breadcrumbs to Routes


  • PHP 7.0
  • Laravel 5.4+


To get started, install Laracrumbs via Composer

composer require evomase/laracrumbs

Next, is to register the Laracrumbs service provider to the providers array of your config/app configuration file:


Basic Usage


Breadcrumbs are created by using the registered routes and defining a callback to return the title for each segment. The following example below shows how this can be done

//Create Route
$route = Route::get('/', 'Controller@method');

//Add route to Breadcrumb
Breadcrumbs::add($route, function(){
    return 'Home';

All parameters assigned to a route will also be passed to the callback enabling you to customize the return value further. Also, objects in the service container are automatically injected in the callback as shown in the example below.

$route = Route::get('users/{user}/edit', 'Controller@method');
Breadcrumbs::add($route, function(App\User $user, Illuminate\Container $app){
   // return a string


A breadcrumbs view has been added which can be included in any view template. Once included, it will automatically generate the breadcrumbs associated to the current request.

<div class="container">

A copy of the breadcrumbs views template can be found in resources\views\vendor


Laracrumbs is open-sourced software licensed under the MIT license