can you please show me your controller
Mar 24, 2020
6
Level 1
Bootstrap tab - all tabs active inside foreach
Hello Team,
I am trying to get a tab view where on the click of a tab I can get fields for that very language in the language_name whose id is {{$lang['id']}} . But with the following code I get all the tab-pane inside the foreach as active.
How can I get the fields based on the Id
<div class="panel-heading">
@lang('global.app_create')
<ul class="nav nav-tabs">
@foreach ($languagefinder as $lang)
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#{{$lang['id']}}lang"> {{$lang['language_name']}} </a>
</li>
@endforeach
</ul>
</div>
<div class="panel-body">
@foreach ($languagefinder as $item)
<div class="tab-content clearfix">
<div class="tab-pane active " id="#{{$item['id']}}lang">
<div id="exTab1" class="container" style="margin-right: 0px;margin-left: 0px;">
</div>
</div>
</div>
@endforeach
</div>
Please or to participate in this conversation.