Use a blade master layout file to hold your tabs so it shows on each page that is extended from the master layout. Then use javascript to show different content under each tab using AJAX. Also, if you use different routes and controllers to post different information, just make sure the you return to index in your controller or the same page where the content is located.
Hi, I'm also struggling with this same problem. I managed to implement something similar using Codeigniter and jQuery Tabs, but I'm struggling to achieve the same thing with Lavarel 4 and Bootstrap Tabs. I am quite new to Lavarel, so bear with me.
I understand the concept of capturing the click event via JS and using Ajax to call the content into the container DIV.
If I want to just call a view, something like the below will work:
<div class="tab-pane" id="bond">@include('bond.bond', array('bond' => $bond))</div>
However, I want to call the controller, because I want to able to validate input in each tab, then return the user back to the same tab.
I can't figure out how to call the controller via JS. I've already defined the routes in app/routes, but I just can't seem to get this to work.
Do you know of any examples I could look at because this is starting to drive me mad. Although I bet the answer in the end will be quite simple.
Thanks, Neil.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community