How can I utilize HTML5 history with Laravel 4? Here is my blade content file:
@extends('main')
@section('content')
This is content.
@endsection
I was thinking to only load the content part in HTML5 history by putting:
@if($showMain)
@extends('main')
@endif
But it doesn't work. The @extends
has to be the very first line of the file. I was thinking of putting a few @if($showMain)
in the main file. But this way will make the code messy and less maintainable. So, how can I archive that with a cleaner way in Laravel blade? Or, is there a better way to do HTML5 history with Laravel?
Thanks.