foxted/breadcrumb

This package is abandoned and no longer maintained. No replacement package was suggested.

Small package to generate breadcrumbs easily in your Laravel app

1.0.1 2014-10-08 23:27 UTC

This package is not auto-updated.

Last update: 2015-10-16 10:28:56 UTC


README

Build Status Latest Stable Version Monthly Downloads Latest Unstable Version License

Small package to quickly generate Bootstrap 3 breadcrumbs in your Laravel app.

Installation

First, pull in the package through Composer.

"require": {
    "foxted/breadcrumb": "~1.0"
}

Then include the service provider within app/config/app.php.

'providers' => [
    'Foxted\Breadcrumb\BreadcrumbServiceProvider'
];

Add a facade alias to this same file at the bottom:

'aliases' => [
    'Breadcrumb' => 'Foxted\Breadcrumb\Facades\Breadcrumb'
];

And finally publish the view:

php artisan view:publish foxted/breadcrumb

Usage

Within your controllers, before rendering your view, generate your breadcrumbs links:

public function index()
{
    Breadcrumb::add('Home', route('home')); // Generate a link node
    Breadcrumb::add('Second page'); // Generate a static node
    Breadcrumb::add('Third page', route('third-page'), 1);
    Breadcrumb::add('Third page', NULL, 1); // Generate an active node (without Link)
    return View::make('index');
}

To show your breadcrumb in your view, just use the following Blade directive:

@breadcrumb

Contribution

Any ideas are welcome. Feel free the submit any issues or pull requests.

Enjoy ;)