调整页面
This commit is contained in:
@@ -7,8 +7,14 @@ use App\Models\Traits\HasOneCover;
|
||||
|
||||
class Article extends Model
|
||||
{
|
||||
|
||||
use HasOneCover, BelongsToCategory;
|
||||
|
||||
public function getLinkAttribute()
|
||||
{
|
||||
return route('article.show', $this);
|
||||
}
|
||||
|
||||
public function get_content_cover()
|
||||
{
|
||||
preg_match("/<img.*?src=\"([^\"]+)\"[^>].*?>/isU", str_ireplace("\\", "", $this->content), $matches);
|
||||
@@ -41,6 +47,7 @@ class Article extends Model
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $path;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user