Methods summary
public static
|
#
start( string $section, string|Closure $content = '' )
Start injecting content into a section.
Start injecting content into a section.
Section::start('header');
Section::start('header', '<title>Laravel</title>');
Parameters
- $section
string $section
- $content
string|Closure $content
|
public static
|
#
inject( string $section, string $content )
Inject inline content into a section.
Inject inline content into a section.
This is helpful for injecting simple strings such as page titles.
Section::inject('header', '<title>Laravel</title>');
Parameters
- $section
string $section
- $content
string $content
|
public static
string
|
#
yield_section( )
Stop injecting content into a section and return its contents.
Stop injecting content into a section and return its contents.
Returns
string
|
public static
string
|
#
stop( )
Stop injecting content into a section.
Stop injecting content into a section.
Returns
string
|
protected static
|
#
extend( string $section, string $content )
Extend the content in a given section.
Extend the content in a given section.
Parameters
- $section
string $section
- $content
string $content
|
public static
|
#
append( string $section, string $content )
Append content to a given section.
Append content to a given section.
Parameters
- $section
string $section
- $content
string $content
|
public static
string
|
#
yield( string $section )
Get the string contents of a section.
Get the string contents of a section.
Parameters
Returns
string
|