public function output()
    {
        if ( $this->session->has('flashMessages') ) {
            $flashMessages = $this->session->get('flashMessages');
            $this->session->set('flashMessages', []);
            $html = null;
            foreach ($flashMessages as $message) {
                $html .= "<div class='". $message['type'] . "'>" . $message['message'] . "</div>";
            }
            return $html;
        }
    }
public function output()
    {
        if ( $this->session->has('flashMessages') ) {
            $flashMessages = $this->session->get('flashMessages');
            $this->session->set('flashMessages', []);
            $html = null;
            foreach ($flashMessages as $message) {
                $html .= "<div class='". $message['type'] . "'>" . $message['message'] . "</div>";
            }
            return $html;
        }
    }
public function output ( ) { if ( $ this -> session -> has ( 'flashMessages' ) ) { $ flashMessages = $ this -> session -> get ( 'flashMessages' ) ; $ this -> session -> set ( 'flashMessages' , [ ] ) ; $ html = null ; foreach ( $ flashMessages as $ message ) { $ html .= "<div class='" . $ message [ 'type' ] . "'>" . $ message [ 'message' ] . "</div>" ; } return $ html ; } }
Gets and resets the flash messages from session and building html.
@return string The html for the output.
Gets and resets the flash messages from session and building html .