laravel - How not to show on a page of chunk of layout? -
i have common layout pages in it, include "form search" (search in header). on page "global search" not display search.
how nicely? check title or route, thing came mind
layout -> include (search.form) -> page
i think best option here utilise route::is($name) in view. allows check if route being accessed, require use of named route, however.
routes.php
route::get('/search', ['uses' => 'searchcontroller@search', 'as' => 'global-search']); view
@if ( ! route::is('global-search')) @include('search.form') @endif
Comments
Post a Comment