Laravel Breadcrumbs

diglactic/laravel-breadcrumbs image

Laravel Breadcrumbs stats

Downloads
2.9M
Stars
718
Open Issues
0
Forks
54

View on GitHub →

A simple Laravel-style way to create breadcrumbs.

Laravel Breadcrumbs by Diglactic

Laravel Breadcrumbs is a package designed to manage breadcrumb navigation in Laravel applications effortlessly. It is an official fork of Dave James Miller's Laravel Breadcrumbs, enhanced and maintained by Diglactic.

Features

  • Easy Integration: Quickly add breadcrumb functionality to your Laravel applications.
  • Template Customization: Comes with built-in support for Bootstrap 4/5, Bulma, Foundation 6, Materialize, Tailwind CSS, UIkit, and JSON-LD structured data. It also allows for custom templates.
  • Dynamic Breadcrumb Generation: Define breadcrumbs using closures, allowing for dynamic generation based on application state or database content.
  • Route-Bound Breadcrumbs: Automatically generate breadcrumbs based on route names, reducing redundancy and enhancing maintainability.
  • Structured Data Support: Supports JSON-LD structured data format, enhancing SEO.
  • Extensive Configuration: Customize and configure breadcrumb templates and behavior directly from Laravel's config files.

Installation

  1. Install via composer:

    composer require diglactic/laravel-breadcrumbs
  2. Define breadcrumbs in routes/breadcrumbs.php. Example:

    Breadcrumbs::for('home', function ($trail) {
    $trail->push('Home', route('home'));
    });
  3. Customize the breadcrumb style by publishing and editing the configuration:

    php artisan vendor:publish --tag=breadcrumbs-config
  4. Output breadcrumbs in your views:

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

Usage Tips

  • Defining Breadcrumbs: Breadcrumbs are defined based on routes, making it straightforward to link breadcrumb trails to controller actions or views.
  • Custom Templates: Modify the appearance of your breadcrumbs by creating custom views or using one of the many predefined templates.
  • Advanced Features: Utilize advanced options like route model binding, dynamic breadcrumb titles, and custom data attributes within breadcrumbs for enhanced control.

Documentation

For more detailed information on usage and advanced features, refer to the official GitHub repository.


This package streamlines breadcrumb management in Laravel projects, making it an essential tool for improving navigation and SEO through structured data integration and dynamic breadcrumb generation.

diglactic photo

🚀 /dih-glack-tic/ Crafting space-grade online solutions since 2019. (That's like... 10 computer years!)

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Diglactic Laravel Breadcrumbs Related Articles

Version-Controlled Documentation Inside Your Laravel App with Laradocs image

Version-Controlled Documentation Inside Your Laravel App with Laradocs

Read article
Community Laravel Extension for Zed image

Community Laravel Extension for Zed

Read article
Type-Safe Shared Data and Page Props in Inertia.js image

Type-Safe Shared Data and Page Props in Inertia.js

Read article
Manage navigational elements in Laravel apps image

Manage navigational elements in Laravel apps

Read article
Handle SEO from your Laravel Models image

Handle SEO from your Laravel Models

Read article
Laravel Boilerplate 7.0 image

Laravel Boilerplate 7.0

Read article
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Tighten logo

Tighten

We help companies turn great ideas into amazing apps, products, and services.

Tighten
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Celebian logo

Celebian

Celebian is a social media marketing agency specializing in helping their clients go viral on TikTok. Whether you're looking to reach a bigger audience or gain more Tiktok followers, likes, and views, they've got you covered.

Celebian
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises