@php

$breadCrumbs = config('bread_crumbs');
$uri = Route::current()->uri;
$breadCrumbLinks = explode('/',$uri);


@endphp
<div class="col-12 col-md-12 ">
    <nav aria-label="breadcrumb" class="breadcrumb-header float-start float-lg-end">
        <ol class="breadcrumb">
            
            @foreach($breadCrumbLinks as $link)
            <li class="breadcrumb-item">
                @if(isset($breadCrumbs[$link]['route']))
                    <a href="{{ route($breadCrumbs[$link]['route']) }}">{{ $breadCrumbs[$link]['name'] }}</a>
                @else
                    {{ $breadCrumbs[$link]['name'] ?? null }}
                @endif
            </li>
            @endforeach
        </ol>
    </nav>
</div>