二次改版
This commit is contained in:
@@ -9,8 +9,9 @@ trait HasOneCover
|
||||
|
||||
/**
|
||||
* 拼接图片全地址
|
||||
* @author 玄尘 2020-03-05
|
||||
*
|
||||
* @return string
|
||||
* @author 玄尘 2020-03-05
|
||||
*/
|
||||
public function getCoverPathAttribute(): ?string
|
||||
{
|
||||
@@ -21,4 +22,20 @@ trait HasOneCover
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 获取标签
|
||||
*
|
||||
* @Author: 玄尘
|
||||
* @Date: 2022/6/28 15:25
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLabelPathAttribute(): ?string
|
||||
{
|
||||
if ($this->label) {
|
||||
return Storage::url($this->label);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user