On this page
ManagesFragments
trait ManagesFragments (View source)
Properties
protected array | $fragments | All of the captured, rendered fragments. |
|
protected array | $fragmentStack | The stack of in-progress fragment renders. |
Methods
void | startFragment(string $fragment) Start injecting content into a fragment. |
|
string | stopFragment() Stop injecting content into a fragment. |
|
mixed | getFragment(string $name, string|null $default = null) Get the contents of a fragment. |
|
array | getFragments() Get the entire array of rendered fragments. |
|
void | flushFragments() Flush all of the fragments. |
Details
void startFragment(string $fragment)
Start injecting content into a fragment.
string stopFragment()
Stop injecting content into a fragment.
mixed getFragment(string $name, string|null $default = null)
Get the contents of a fragment.
array getFragments()
Get the entire array of rendered fragments.
void flushFragments()
Flush all of the fragments.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/View/Concerns/ManagesFragments.html