src/Messages.php
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;
    }
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;
    }
Clear messages from the session data.

@param string $type The type of messages to clear

@return bool