hoaaah/laravel-bootstrap-breadcrumb

There is no license information available for the latest version (v2.0.0) of this package.

A packages for create bootstrap breadcrumb dynamically.

v2.0.0 2021-07-05 10:13 UTC

This package is auto-updated.

Last update: 2024-11-05 17:49:10 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

composer require hoaaah/laravel-bootstrap-breadcrumb:^2.0

or add

"hoaaah/laravel-bootstrap-breadcrumb": "^2.0"

to the require section of your composer.json file.

Usage

You can use this helper in your view. It also support blade template. This breadcrumb support Boostrap 4 Breadcrumb, but you can configure so this widget can be used in other template as well.

Breadcrumb Skeleton

This helper consist of this following code.

use hoaaah\LaravelBreadcrumb\Breadcrumb as Breadcrumb;

// ..........

    {!! Breadcrumb::widget([
        'items' => [
            ['label' => 'Link 1'],
            ['url' => route('route.name'), 'label' => 'Link 2'],
            ['label' => $this->title]
        ]
    ]) !!}

Costum Homepage

This helper use url('\') as default home Url. You can change your home url with homeUrl method. The following code as an example.

use hoaaah\LaravelBreadcrumb\Breadcrumb as Breadcrumb;

// ..........

    {!! Breadcrumb::widget([
        'homeUrl' => route('home.dashboard'),
        'homeText' => 'Costumize Home Text',
        'items' => [
            ['label' => 'Link 1'],
            ['url' => route('route.name'), 'label' => 'Link 2'],
            ['label' => $this->title]
        ]
    ]) !!}

Other Method

Creator

This asset wrapper was created by and is maintained by hoaaah.