@php // Check karo konse page par hai aur back link kya hoga $showBackArrow = false; $backLink = '#'; // Get clinic_id from current route if it exists $clinicId = request()->route('clinic_id'); // Clinics create/add/edit page if(Request::routeIs('clinics.create') || Request::routeIs('add-new-Clinic') || Request::routeIs('clinic.edit')) { $showBackArrow = true; $backLink = route('clinics'); } // Moduls page elseif(Request::routeIs('moduls')) { $showBackArrow = true; $backLink = route('clinics'); } // hospital-department page elseif(Request::routeIs('hospital-department')) { $showBackArrow = true; $backLink = route('add-new-Clinic'); } // Room page elseif(Request::routeIs('Room')) { $showBackArrow = true; $backLink = route('add-new-Clinic'); } // All Persons page elseif(Request::routeIs('All-persons')) { $showBackArrow = true; $backLink = route('clinics'); } // Medical Waste page elseif(Request::routeIs('Medical-Waste')) { $showBackArrow = true; $backLink = $clinicId ? route('moduls', ['clinic_id' => $clinicId]) : route('moduls'); } // Waste Type page elseif(Request::routeIs('Waste-Type')) { $showBackArrow = true; $backLink = $clinicId ? route('Medical-Waste', ['clinic_id' => $clinicId]) : route('Medical-Waste'); } // Waste Bags page elseif(Request::routeIs('Waste-bags')) { $showBackArrow = true; $backLink = $clinicId ? route('Medical-Waste', ['clinic_id' => $clinicId]) : route('Medical-Waste'); } // Container Type page elseif(Request::routeIs('container-type')) { $showBackArrow = true; $backLink = $clinicId ? route('Medical-Waste', ['clinic_id' => $clinicId]) : route('Medical-Waste'); } // Collectors page elseif(Request::routeIs('collectors')) { $showBackArrow = true; $backLink = $clinicId ? route('Medical-Waste', ['clinic_id' => $clinicId]) : route('Medical-Waste'); } // All Collectors page elseif(Request::routeIs('All-collectors')) { $showBackArrow = true; $backLink = route('dashboard'); } // Document page elseif(Request::routeIs('document')) { $showBackArrow = true; $backLink = route('dashboard'); } // Cleaning page elseif(Request::routeIs('cleaning')) { $showBackArrow = true; $backLink = route('moduls'); } // summary page elseif(Request::routeIs('summary')) { $showBackArrow = true; $backLink = $clinicId ? route('Medical-Waste', ['clinic_id' => $clinicId]) : route('dashboard'); } // All cleaning page elseif(Request::routeIs('All-cleaning')) { $showBackArrow = true; $backLink = route('cleaning'); } @endphp @if($showBackArrow) @endif

@yield('title-sub', 'Dashboard')