Including header in the wrong place Laravel 4
I am trying to include header.blade.php in the first place and not in the content, but it includes the wrong path.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<!-- include navbar / header -->
@include('site.components.header')
<!-- content -->
@yield('content')
<!-- footer -->
@include('site.components.footer')
</body>
</html>
after rendering, the first and header is included in the HTML content.
+3
source to share
1 answer
When you create a section where you can enable something, you need to stop it as well:
@section('name of section here')
//Your customized content for this section.
@stop
When using @show, it immediately outputs this content, which ends the current section and gives it. Disposal means that this is the point at which the contents of the section will be displayed.
@section('name of section here')
//Your customized content for this section.
@show
+1
source to share