interface MessageBag implements Arrayable, Countable (View source)
| toArray() No description | from Arrayable | |
| array | keys()
Get the keys present in the message bag. | |
| $this | add(string $key, string $message)
Add a message to the bag. | |
| $this | merge(MessageProvider|array $messages)
Merge a new array of messages into the bag. | |
| bool | has(string|array $key)
Determine if messages exist for a given key. | |
| string | first(string|null $key = null, string|null $format = null)
Get the first message from the bag for a given key. | |
| array | get(string $key, string|null $format = null)
Get all of the messages from the bag for a given key. | |
| array | all(string|null $format = null)
Get all of the messages for every key in the bag. | |
| $this | forget(string $key)
Remove a message from the bag. | |
| array | getMessages()
Get the raw messages in the container. | |
| string | getFormat()
Get the default message format. | |
| $this | setFormat(string $format = ':message')
Set the default message format. | |
| bool | isEmpty()
Determine if the message bag has any messages. | |
| bool | isNotEmpty()
Determine if the message bag has any messages. |
No description
Get the keys present in the message bag.
Add a message to the bag.
Merge a new array of messages into the bag.
Determine if messages exist for a given key.
Get the first message from the bag for a given key.
Get all of the messages from the bag for a given key.
Get all of the messages for every key in the bag.
Remove a message from the bag.
Get the raw messages in the container.
Get the default message format.
Set the default message format.
Determine if the message bag has any messages.
Determine if the message bag has any messages.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Contracts/Support/MessageBag.html