heihachi88
7/30/2014 - 7:32 AM

@yield vs @section && @show

@yield vs @section && @show

# yield is used when you just need to make section with default value or without
@yield('section', 'default value')

# Show is used in case if you need to use parent and append content to a parent
@section('test')
Laravel
@show

# Then in another blade template
@section('test')
This is @parent # will print This is Laravel
@stop