@php $current = request()->path(); $tabs = [ ['label' => 'Dashboard', 'href' => '/b2bportal', 'match' => 'b2bportal'], ['label' => 'Orders', 'href' => '/b2bportal/orders', 'match' => 'b2bportal/orders'], ['label' => 'Customers', 'href' => '/b2bportal/customers', 'match' => 'b2bportal/customers'], ['label' => 'Carts', 'href' => '/b2bportal/carts', 'match' => 'b2bportal/carts'], ['label' => 'Shipping rules', 'href' => '/b2bportal/shipping-rules', 'match' => 'b2bportal/shipping-rules'], ['label' => 'Location routing', 'href' => '/b2bportal/location-routing', 'match' => 'b2bportal/location-routing'], ['label' => 'Promos', 'href' => '/b2bportal/promos', 'match' => 'b2bportal/promos'], ['label' => 'Settings', 'href' => '/b2bportal/settings', 'match' => 'b2bportal/settings'], ]; @endphp
@foreach($tabs as $t) str_starts_with($current, ltrim($t['match'], '/'))])> {{ $t['label'] }} @endforeach