Answer the question
In order to leave comments, you need to log in
Laravel 5.1 how to not render one element in layout for one page?
I have a common layout for all pages, in it I include search forms in the header.
But on the global search page, I would not want to display
it How to do it beautifully, check the title or route, the only thing that came to mind
Layout -> include(search.form) -> page
Answer the question
In order to leave comments, you need to log in
For example like this
// в layout.blade.php
@section('search')
@include('search.form')
@endsection
// в шаблоне где вывод не нужно делаем блок пустым
@section('search')
@endsection
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question