public function getMessages()
    {
        $messages = $this->fromPrevious;

        foreach ($this->forNow as $key => $values) {
            if (!isset($messages[$key])) {
                $messages[$key] = [];
            }

            foreach ($values as $value) {
                array_push($messages[$key], $value);
            }
        }

        return $messages;
    }
public function getMessages()
    {
        $messages = $this->fromPrevious;

        foreach ($this->forNow as $key => $values) {
            if (!isset($messages[$key])) {
                $messages[$key] = [];
            }

            foreach ($values as $value) {
                array_push($messages[$key], $value);
            }
        }

        return $messages;
    }
public function getMessages ( ) { $ messages = $ this -> fromPrevious ; foreach ( $ this -> forNow as $ key => $ values ) { if ( ! isset ( $ messages [ $ key ] ) ) { $ messages [ $ key ] = [ ] ; } foreach ( $ values as $ value ) { array_push ( $ messages [ $ key ] , $ value ) ; } } return $ messages ; }
Get flash messages

@return array Messages to show for current request
Get flash messages