public function message($type, $message)
    {
        if ( $this->session->has('flashMessages') ) {
            $flashMessages = $this->session->get('flashMessages');
            $flashMessages[] = ['type' => $type, 'message' => $message];
            $this->session->set('flashMessages', $flashMessages);
        } else {
            $this->session->set('flashMessages', [['type' => $type, 'message' => $message]]);
        }
    }