Laravel Cloud is here! Zero-config managed infrastructure for Laravel apps. Deploy now.

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

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
Laravel Breadcrumbs Package image

Laravel Breadcrumbs Package

Read article
Bugsnag adds support for seeing what happens before an exception is thrown image

Bugsnag adds support for seeing what happens before an exception is thrown

Read article
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
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Blastup logo

Blastup

Blastup provides social media enhancement services including buying Instagram likes, followers, and views, with features like instant delivery and a variety of packages to suit different needs.

Blastup
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger