code: 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;
      }
docs: Clear messages from the session data.
  
  @param string $type The type of messages to clear
  
  @return bool