Support the ongoing development of Laravel.io →
Blade Packages
Last updated 1 year ago.
0

There are a couple I know of that are pretty great:

  1. http://packalyst.com/index.php/packages/package/mj/breadcrumb
  2. https://github.com/CreITive/Laravel-4-Breadcrumbs

You could use jquery instead if you can't don't like any of them:

<script>

jQuery(document).ready(function($) { 
    var breadcrumb_1 = $('li.item>a:eq(0)').text();
    var breadcrumb_1_link = $('li.item>a:eq(0)').attr('href');;
    
    var breadcrumb_2 = $('li.item>a:eq(1)').text();
    var breadcrumb_2_link = $('li.item>a:eq(1)').attr('href');;
    html = '<div class="breadcrumb">';
        html += '>> <a href="' + breadcrumb_1_link + '">' + breadcrumb_1 + '</a>';
    console.log( 'b1 ' + breadcrumb_1 + '   b2:' + breadcrumb_2 + ':' );
    if(breadcrumb_2 != breadcrumb_1 && breadcrumb_2 != '') {
        html += ' <span> > > </span> ';
        html += ' <a href="' + breadcrumb_2_link + '">' + breadcrumb_2 + '</a>';
    }
    html += '</div>';
    //make sure you have a div with id breadcrumb in existence before this.
    $('#breadcrumb').html(html);

});
</script>
Last updated 1 year ago.
0

Great suggestions. I woul rather use something for backend for breadcrumbs in my application that will e able to be passed from page to page dynamically with child/parent pages as well as category.

Last updated 1 year ago.
0

Takes a bit of setup time to configure the breadcrumbs file if your app is large, but it does a nice job:

https://github.com/davejamesmiller/laravel-breadcrumbs

Last updated 1 year ago.
0

stickman373 said:

Takes a bit of setup time to configure the breadcrumbs file if your app is large, but it does a nice job:

https://github.com/davejamesmiller/laravel-breadcrumbs

I've looked at this but I'm struggling with the set up. I have my breadcrumbs.php inside the app directory and have the following route:

Breadcrumbs::register('users', function($breadcrumbs) {
    $breadcrumbs->push('Users', route('users/index'));
});

This works however with how I have my templating set up I need to figure out how I can just have it see what page its currently on and display the breadcrumbs from the breadcrumbs file.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.