Support the ongoing development of Laravel.io →
posted 10 years ago
Blade
Last updated 2 years ago.
0
@section('content')
<h1>Test</h1>
@show

is equivalent to

@section('content')
<h1>Test</h1>
@stop

@yield('content')
Last updated 2 years ago.
0

A practical example would be

@section('footer')
    <footer>...</footer>
@show

in your master page instead of let's say including it from a partial. That way you can use for example

@section('footer')
@ parent
<script src="..."></script>
@stop

in register.blade.php to include validation script that you don't require anywhere else on the site. Or you remove the @ parent and it overrides the master page content.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Sharping sharping Joined 28 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.