I know you can do @yield('section', 'Default Content')
.
I tried:
@yield('section')
default<br>
multiline<br>
content<br>
@stop
but it didn't work, how can I have a multiline default for @yield?
Try the following
@section('section')
default<br>
multiline<br>
content<br>
@stop
I found a way, it works doing:
@section('section')
default<br>
multiline<br>
content<br>
@stop
@yield('section')
Note the @section
block goes above @yield
, this way you can have a more readable multiline default for @yield in for example a master page like app.blade.php
As an alternative solution you could also use an entirely new view as default and render it into @yield
like this:
@yield('section', View::make('section.default'))
and then in section.default.blade.php
default<br>
multiline<br>
content<br>