0, 'display' => 0, 'ip']; public function insertRow($data) { $object = $this::create($data); return $object; } protected function setContentAttr($value) { return htmlspecialchars($value); } protected function setIpAttr() { return Request::instance()->ip(); } public function getCommentList($where = null, $order = null, $field = null, $limit = null) { if (is_array($where)) { $where = array_merge(['stat' => ['eq', '0']], $where); } if ($where) { $this->where($where); } if ($order) { $this->order($order); } if ($field) { $this->field($field); } if (empty($limit)) { $limit = Config::get('list_rows') > 0 ? Config::get('list_rows') : 12; } $object = $this->paginate($limit); return $object; } }