Я решил проблему с помощью JavaScript.взял идентификатор вкладки и использовал if else в контроллере для отображения представления во вкладках.спасибо всем за помощь.
<script>
var url = document.location.toString();
if (url.match('#')) {
// $('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show');
}
// Change hash for page-reload
$('.nav-tabs a').on('shown.bs.tab', function (e) {
window.location.hash = e.target.hash;
});
$(document).ready(function () {
// $('#tabMenu a[href="#{{ old('tab') }}"]').tab('show');
var baseurl= "{{url('/')}}";
var token ="{{csrf_token()}}";
$(document).off('click','.navtab');
$(document).on('click','.navtab',function(response){
var tabid = $(this).attr('id');
var url =baseurl+'/gettabdata';
var infoData ={tabid:tabid,_token:token};
$.post(url,infoData,function(response){
console.log(response);
$('.tab-content').html(response);
})
alert(tabid);
});
$(document).off('click','.savedata');
$(document).on('click','.savedata',function(response){
$('#mainForm').ajaxSubmit({
// dataType:'json',
success:function(response){
console.log(response);
}
})
});
});
// Javascript to enable link to tab
$(function () {
var hash = window.location.hash;
// hash && $('ul.nav a[href="' + hash + '"]').tab('show');
});
</script>