/** * Method to auto-populate the model state. * */ public function populateState() { if ($this->getState('is.search')) { $this->setState('filter.published_today', true)->setState('filter.publication_status', 'published'); } return parent::populateState(); }