3030 <div class =" nav-tabs-custom {{ $horizontalTabs ? ' ' : ' row' } }" id =" form_tabs" >
3131 <ul class =" nav {{ $horizontalTabs ? ' nav-tabs' : ' flex-column nav-pills' } } {{ $horizontalTabs ? ' ' : ' col-md-3' } }" role =" tablist" >
3232 @foreach ($crud -> getTabs () as $k => $tab )
33+ @php
34+ $tabSlug = Str:: slug ($tab );
35+ if (empty ($tabSlug )) {
36+ $tabSlug = $k ;
37+ }
38+ @endphp
3339 <li role =" presentation" class =" nav-item" >
34- <a href =" #tab_{{ Str :: slug ( $tab ) } }"
35- aria-controls =" tab_{{ Str :: slug ( $tab ) } }"
40+ <a href =" #tab_{{ $tabSlug } }"
41+ aria-controls =" tab_{{ $tabSlug } }"
3642 role =" tab"
3743 data-toggle =" tab" {{-- tab indicator for Bootstrap v4 --}}
38- tab_name =" {{ Str :: slug ( $tab ) } }" {{-- tab name for Bootstrap v4 --}}
39- data-name =" {{ Str :: slug ( $tab ) } }" {{-- tab name for Bootstrap v5 --}}
44+ tab_name =" {{ $tabSlug } }" {{-- tab name for Bootstrap v4 --}}
45+ data-name =" {{ $tabSlug } }" {{-- tab name for Bootstrap v5 --}}
4046 data-bs-toggle =" tab" {{-- tab name for Bootstrap v5 --}}
4147 class =" nav-link text-decoration-none {{ isset ($tabWithError ) && $tabWithError ? ($tab == $tabWithError ? ' active' : ' ' ) : ($k == 0 ? ' active' : ' ' ) } }"
4248 >{{ $tab } } </a >
@@ -47,7 +53,13 @@ class="nav-link text-decoration-none {{ isset($tabWithError) && $tabWithError ?
4753 <div class =" tab-content {{ $horizontalTabs ? ' ' : ' col-md-9' } }" >
4854
4955 @foreach ($crud -> getTabs () as $k => $tabLabel )
50- <div role =" tabpanel" class =" tab-pane {{ isset ($tabWithError ) && $tabWithError ? ($tabLabel == $tabWithError ? ' active' : ' ' ) : ($k == 0 ? ' active' : ' ' ) } }" id =" tab_{{ Str:: slug ($tabLabel ) } }" >
56+ @php
57+ $tabSlug = Str:: slug ($tabLabel );
58+ if (empty ($tabSlug )) {
59+ $tabSlug = $k ;
60+ }
61+ @endphp
62+ <div role =" tabpanel" class =" tab-pane {{ isset ($tabWithError ) && $tabWithError ? ($tabLabel == $tabWithError ? ' active' : ' ' ) : ($k == 0 ? ' active' : ' ' ) } }" id =" tab_{{ $tabSlug } }" >
5163
5264 <div class =" row" >
5365 @include (' crud::inc.show_fields' , [' fields' => $crud -> getTabItems ($tabLabel , ' fields' )] )
0 commit comments