The subchild contained blade
errors. It wasn't malformed HTML, but rather a php error occurring within an escaped section of the blade. The errors weren't being displayed though (possible because it was nested), so the output of the errors was being suppressed.
How do I include a sub blade inside another blade in Laravel?
-
29-09-2022 - |
Question
Given that I create a blade using the following:
View::make('home', $data);
And within home.blade.php
I have the following:
@extends('master')
@section('main')
// groovy content
@stop
Where 'master.blade.php' is simply the main wrappers and a @yield
to 'main'.
If I add @include
inside home.blade.php
it no longer extends from master
.
So how do I include a subblade inside a blade that is extending another.
@extends('master')
@section('main')
// groovy content
@include('subcontent')
@stop
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow