'array', ]; public function matches() { return $this->hasMany(CtzqJqcMatch::class, 'ctzq_jqc_id', 'id'); } public function getResultArrayAttribute() { if (!$this->result_info) { return []; } $result = []; $len = strlen($this->result_info); for($i=0;$i<$len;$i++) { $val = $this->result_info[$i]; if ($val == '+') { continue; } $item = $val; if ($val == '3') { $item = '3+'; } $result[] = $item; } return $result; } public function getCloseTime($earlySecond) { $time = strtotime($this->end_time); return date('Y-m-d H:i:s', $time - $earlySecond); } }