<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        @php
            $currentRoute = Route::currentRouteName();
            $breadcrumbs = [
                ['url' => '', 'title' => '']
            ];

            switch (true) {
    case strpos($currentRoute, 'video-enrichment') !== false:
        $breadcrumbs[] = ['url' => route('dash'), 'title' => 'Home / '];
        $breadcrumbs[] = ['url' => route('video-enrichment'), 'title' => 'Camera & Stream Management'];
        break;

    case strpos($currentRoute, 'only.cameras.lists') !== false:
        $breadcrumbs[] = ['url' => route('video-enrichment'), 'title' => 'Camera & Stream Management / '];
        $breadcrumbs[] = ['url' => route('only.cameras.lists'), 'title' => 'Camera Stream Monitoring and Analytics
'];
        break;

    case strpos($currentRoute, 'region.add') !== false:
        $breadcrumbs[] = ['url' => route('video-enrichment'), 'title' => 'Camera & Stream Management / '];
        $breadcrumbs[] = ['url' => route('region.add'), 'title' => 'Add New Region'];
        break;

    case strpos($currentRoute, 'all.rigions.lists') !== false:
        $breadcrumbs[] = ['url' => route('video-enrichment'), 'title' => 'Camera & Stream Management / '];
        $breadcrumbs[] = ['url' => route('all.rigions.lists'), 'title' => 'Region List'];
        break;

        case strpos($currentRoute, 'camera.monitor') !== false:
        $breadcrumbs[] = ['url' => route('only.cameras.lists'), 'title' => 'Camera Stream Monitoring and Analytics
 / '];
        $breadcrumbs[] = ['url' => '', 'title' => 'Monitor Stream'];
        break;

        case strpos($currentRoute, 'stream.frame.detected') !== false:
        $breadcrumbs[] = ['url' => route('only.cameras.lists'), 'title' => 'Camera Stream Monitoring and Analytics
 / '];
        $breadcrumbs[] = ['url' => '', 'title' => 'Forensic'];
        break;

        case strpos($currentRoute, 'stream.face.detected') !== false:
        $breadcrumbs[] = ['url' => route('only.cameras.lists'), 'title' => 'Camera Stream Monitoring and Analytics
 / '];
        $breadcrumbs[] = ['url' => url()->previous(), 'title' => 'Forensic / '];
        $breadcrumbs[] = ['url' => '', 'title' => 'Face Detection Details'];
        break;

        case strpos($currentRoute, 'attendance.setup') !== false:
        $breadcrumbs[] = ['url' => route('only.cameras.lists'), 'title' => 'Camera Stream Monitoring and Analytics
 / '];
        $breadcrumbs[] = ['url' => url()->previous(), 'title' => 'Attendance Setup  '];
        break;

        case strpos($currentRoute, 'camera.find') !== false:
        $breadcrumbs[] = ['url' => route('only.cameras.lists'), 'title' => 'Camera Stream Monitoring and Analytics
 / '];
        $breadcrumbs[] = ['url' => url()->previous(), 'title' => 'Edit Camera  '];
        break;

        case strpos($currentRoute, 'camera.add') !== false:
        $breadcrumbs[] = ['url' => route('video-enrichment'), 'title' => 'Camera & Stream Management / '];
        $breadcrumbs[] = ['url' => route('all.rigions.lists'), 'title' => 'Region List / '];
        $breadcrumbs[] = ['url' => '', 'title' => 'Add Camera'];

        case strpos($currentRoute, 'streamWithCamera.add') !== false:
        $breadcrumbs[] = ['url' => route('video-enrichment'), 'title' => 'Camera & Stream Management / '];
        $breadcrumbs[] = ['url' => '', 'title' => 'Add Camera & Region'];

        break;

}

        @endphp

        <nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        @foreach($breadcrumbs as $index => $crumb)
            @if($index == count($breadcrumbs) - 1)
                 <li class="breadcrumb-item active" aria-current="page">{{ $crumb['title'] }}</li>
            @else
                <li class="breadcrumb-item"><a href="{{ $crumb['url'] }}">{{ $crumb['title'] }}</a></li>
            @endif
        @endforeach
    </ol>

</nav>
