trait InteractsWithViews

Methods

view(string $view, Arrayable|array $data = [])

Create a new TestView from the given view.

blade(string $template, Arrayable|array $data = [])

Render the contents of the given Blade template string.

component(string $componentClass, Arrayable|array $data = [])

Render the given view component.

withViewErrors(array $errors, string $key = 'default')

Populate the shared view error bag with the given errors.

Details

at line 22
protected TestView view(string $view, Arrayable|array $data = [])

Create a new TestView from the given view.

Parameters

string $view
Arrayable|array $data

Return Value

TestView

at line 33
protected TestView blade(string $template, Arrayable|array $data = [])

Render the contents of the given Blade template string.

Parameters

string $template
Arrayable|array $data

Return Value

TestView

at line 78
protected TestComponent component(string $componentClass, Arrayable|array $data = [])

Render the given view component.

Parameters

string $componentClass
Arrayable|array $data

Return Value

TestComponent

at line 97
protected InteractsWithViews withViewErrors(array $errors, string $key = 'default')

Populate the shared view error bag with the given errors.

Parameters

array $errors
string $key

Return Value

InteractsWithViews