Overtrue\Validation\MessageBag::all PHP Method

all() public method

Get all of the messages for every key in the bag.
public all ( string $format = null ) : array
$format string
return array
    public function all($format = null)
    {
        $format = $this->checkFormat($format);
        $all = [];
        foreach ($this->messages as $key => $messages) {
            $all = array_merge($all, $this->transform($messages, $format, $key));
        }
        return $all;
    }

Usage Example

Example #1
0
 /**
  * Get the message container for the validator.
  *
  *
  * @return \Overtrue\Support\MessageBag
  */
 public function messages()
 {
     if (!$this->messages) {
         $this->passes();
     }
     return $this->messages->all();
 }
All Usage Examples Of Overtrue\Validation\MessageBag::all