I have used frenzyapp/turbolinks package in the past and it worked really well. Check it out, it’s basically the same as PJAX.
I tried it today and really easy to implement. Here is it https://github.com/vtalbot/pjax. And on the link where you want to call pjax you add this:
<a data-pjax="#page-wrapper" class="{{ Route::currentRouteName() =='getAdmin' ? 'active' : '' }}" href="{{ URL::route('getAdmin') }}"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
So for example my content of route named getAdmin will be loaded in #page-wrapper div.
In your master view you add scripts
{{ HTML::script('js2/jquery.js'); }}
{{ HTML::script('js2/jquery.pjax.js'); }}
and
<script type="text/javascript">
$(function() {
$(document).pjax('a');
});
</script>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community