/** * Adds selects to a query * * @param array $selects * * @return void */ public function filterQuery(&$selects) { if ($select = $this->getOption('select')) { $selects[] = $this->db->raw($select . ' AS ' . $this->db->getQueryGrammar()->wrap($this->getOption('column_name'))); } }
/** * @param null $time * @return mixed */ public function clear($time = null) { return $this->db->table($this->model->getTable())->where('updated_at', '<', date($this->db->getQueryGrammar()->getDateFormat(), strtotime('-' . $time . ' minutes')))->delete(); }