ViewErrorBag

class ViewErrorBag implements Countable (View source)

Properties

protected array $bags The array of the view error bags.

Methods

bool hasBag(string $key = 'default')

Checks if a named MessageBag exists in the bags.

MessageBag getBag(string $key)

Get a MessageBag instance from the bags.

array getBags()

Get all the bags.

$this put(string $key, MessageBag $bag)

Add a new MessageBag instance to the bags.

int count()

Get the number of messages in the default bag.

mixed __call(string $method, array $parameters)

Dynamically call methods on the default bag.

MessageBag __get(string $key)

Dynamically access a view error bag.

void __set(string $key, MessageBag $value)

Dynamically set a view error bag.

Details

bool hasBag(string $key = 'default')

Checks if a named MessageBag exists in the bags.

Parameters

string $key

Return Value

bool

MessageBag getBag(string $key)

Get a MessageBag instance from the bags.

Parameters

string $key

Return Value

MessageBag

array getBags()

Get all the bags.

Return Value

array

$this put(string $key, MessageBag $bag)

Add a new MessageBag instance to the bags.

Parameters

string $key
MessageBag $bag

Return Value

$this

int count()

Get the number of messages in the default bag.

Return Value

int

mixed __call(string $method, array $parameters)

Dynamically call methods on the default bag.

Parameters

string $method
array $parameters

Return Value

mixed

MessageBag __get(string $key)

Dynamically access a view error bag.

Parameters

string $key

Return Value

MessageBag

void __set(string $key, MessageBag $value)

Dynamically set a view error bag.

Parameters

string $key
MessageBag $value

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Support/ViewErrorBag.html