Warning

Laravel Breadcrumbs is no longer maintained. Please see the README for more details.

Outputting Breadcrumbs

Call Breadcrumbs::render() in the view template for each page, passing it the name of the breadcrumb to use and any additional parameters.

With Blade

In the page (e.g. resources/views/home.blade.php):

{!! Breadcrumbs::render('home') !!}

Or with a parameter:

{!! Breadcrumbs::render('category', $category) !!}

With Blade layouts and @section

In the page (e.g. resources/views/home.blade.php):

@extends('layout.name')

@section('breadcrumbs', Breadcrumbs::render('home'))

In the layout (e.g. resources/views/app.blade.php):

@yield('breadcrumbs')

Pure PHP (without Blade)

In the page (e.g. resources/views/home.php):

<?= Breadcrumbs::render('home') ?>

Or use the long-hand syntax if you prefer:

<?php echo Breadcrumbs::render('home') ?>