-
composer.json
Open in GitHub{ "require": { "php": "^8.0", // "tabuna/breadcrumbs": "^2.3", }, }
-
routes/breadcrumbs.php
Open in GitHubuse Tabuna\Breadcrumbs\Breadcrumbs; Breadcrumbs::for('dashboard', function ($trail) { $trail->push(__('Dashboard'), route('dashboard')); }); Breadcrumbs::for('short_url.edit', function ($trail, $keyword) { $trail->parent('dashboard') ->push($keyword, route('short_url.edit', $keyword)); }); //
-
resources/views/backend/partials/header.blade.php
Open in GitHub<ul class="nav navbar-nav d-md-down-none"> <li class="nav-item px-3"> <a class="nav-link" id="homepage-icon" href="{{ url('./') }}" title="{{appName()}} @lang('Home Page')" data-toggle="tooltip"><i class="fas fa-home"></i></a> </li> @foreach (Breadcrumbs::current() as $crumbs) @if ($crumbs->url() && !$loop->last) <li class="breadcrumb-item"> <a href="{{ $crumbs->url() }}"> {{ $crumbs->title() }} </a> </li> @else <li class="breadcrumb-item active"> {{ $crumbs->title() }} </li> @endif @endforeach </ul>