interface
Illuminate
/
Contracts
/
Support
/
MessageBag
You are viewing an older version of the documentation. For the latest, please visit master documentation.
MessageBag
Methods
public
keys ( ) : array
Get the keys present in the message bag.
public
add ( $key , $message ) : $this
Add a message to the bag.
Parameters
- $key string
- $message string
public
merge ( $messages ) : $this
Merge a new array of messages into the bag.
Parameters
- $messages MessageProvider |array
public
has ( $key ) : bool
Determine if messages exist for a given key.
Parameters
- $key string|array
public
first ( $key , $format ) : string
Get the first message from the bag for a given key.
Parameters
- $key string|null
- $format string|null
public
get ( $key , $format ) : array
Get all of the messages from the bag for a given key.
Parameters
- $key string
- $format string|null
public
all ( $format ) : array
Get all of the messages for every key in the bag.
Parameters
- $format string|null
public
getMessages ( ) : array
Get the raw messages in the container.
public
getFormat ( ) : string
Get the default message format.
public
setFormat ( $format ) : $this
Set the default message format.
Parameters
- $format string
public
isEmpty ( ) : bool
Determine if the message bag has any messages.
public
isNotEmpty ( ) : bool
Determine if the message bag has any messages.