I'm using a template for the menu and footer to be duplicated on all pages. I put if
in the footer for when it is a certain route he change the content, but that is not what is happening, he is interpreting each and every route as "home". If I access the "company" route it will go to the right page, but the footer will remain the same. Giving a echo Route::currentRouteName();
just got "home".
Routes
Route::get('/', array('as' => 'home', 'uses' => 'HomeController@index'));
Route::get('home', array('as' => 'home', 'uses' => 'HomeController@index'));
Route::get('empresa', array('as' => 'empresa', 'uses' => 'EmpresaController@index'));
Template
@if(str_is('home', Route::currentRouteName()))
<div class="pure-g">
<div class="pure-u-1">
<footer id="rodapeHome">
<p id="responsabilidadeSocialHomeRodapeTexto">Responsabilidade social também é nosso foco:</p>
<div id="empresasResponsabilidadeSocial">
@foreach($acaoSocial as $acaoSocial)
<img src="assets/images/acaosocial/{{$acaoSocial->imagem}}" />
@endforeach
</div>
</footer>
</div>
<div class="pure-u-1" id="caixaDireitosAutorais">
<p id="tituloRodapeDireitosReservados">© 2014 Titina Leão - Todos os direitos reservados.<p/>
</div>
</div>