Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

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!)


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
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
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
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
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
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit