public function getAllMessages()
    {
        $messages = [];
        foreach (array_keys($this->errors) as $key) {
            $messages = array_merge($messages, $this->getMessages($key));
        }
        return $messages;
    }
public function getAllMessages()
    {
        $messages = [];
        foreach (array_keys($this->errors) as $key) {
            $messages = array_merge($messages, $this->getMessages($key));
        }
        return $messages;
    }
public function getAllMessages ( ) { $ messages = [ ] ; foreach ( array_keys ( $ this -> errors ) as $ key ) { $ messages = array_merge ( $ messages , $ this -> getMessages ( $ key ) ) ; } return $ messages ; }
get all messages

@return  array
get all messages