].*?>/isU", str_ireplace("\\", "", $this->content), $matches); if (isset($matches[1])) { return $matches[1]; } else { return ''; } } /** * Notes: 获取一个默认图片 * @Author: 玄尘 * @Date : 2020/6/3 16:29 * @return mixed|string */ public function get_one_cover() { if ($this->cover_path) { $path = $this->cover_path; } else { $path = $this->get_content_cover(); if ($path) { $this->cover = str_replace("/storage", "", $path); $this->save(); $path = config('app.url') . $path; } } return $path; } }