public function clear($type = 'all')
    {
        if ($type === 'all') {
            $this->driver->remove('flash_messages');
        } else {
            $flashMessages = $this->driver->get('flash_messages');
            unset($flashMessages[$type]);
            $this->driver->set('flash_messages', $flashMessages);
        }

        return true;
    }