code: public function setShowUnpublished($showUnpublished)
      {
          if ($this->useCookies) {
              Cookie::queue($this->cookiePrefix . 'show_unpublished', $showUnpublished);
          }
          $this->useDB = $showUnpublished ? 2 : 1;
      }
docs: Set the default showUnpublished.
  
  @param  string $showUnpublished
  
  @return void