Using second argument of Section to pass a value

Submitted by msurguy - 10 years ago

Usually you would use @section and @stop to pass data to a Blade section. When your data is limited to a short text like page title you could use the second argument of @section to pass that data.

// no need to use @stop when using second argument of @section
@section('title','This is my title')

// Same as 
This is my title