Method |
Description |
|
__construct ( array $messages = [] ) : MessageBag |
Create a new message bag instance. |
|
__toString ( ) : string |
Convert the message bag to its string representation. |
|
add ( string $key, string $message ) |
Add a message to the bag. |
|
all ( string $format = null ) : array |
Get all of the messages for every key in the bag. |
|
any ( ) : boolean |
Determine if the message bag has any messages. |
|
count ( ) : integer |
Get the number of messages in the container. |
|
first ( string $key = null, string $format = null ) : string |
Get the first message from the bag for a given key. |
|
get ( string $key, string $format = null ) : array |
Get all of the messages from the bag for a given key. |
|
getFormat ( ) : string |
Get the default message format. |
|
getMessageBag ( ) : MessageBag |
Get the messages for the instance. |
|
getMessages ( ) : array |
Get the raw messages in the container. |
|
has ( string $key = null ) : boolean |
Determine if messages exist for a given key. |
|
isEmpty ( ) : boolean |
Determine if the message bag has any messages. |
|
jsonSerialize ( ) : array |
Convert the object into something JSON serializable. |
|
merge ( array $messages ) |
Merge a new array of messages into the bag. |
|
setFormat ( string $format = ':message' ) : MessageBag |
Set the default message format. |
|
toArray ( ) : array |
Get the instance as an array. |
|
toJson ( integer $options ) : string |
Convert the object to its JSON representation. |
|