feat: add community tag icons
This commit is contained in:
@@ -3,8 +3,19 @@
|
||||
namespace app\common\model\community;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
class CommunityTag extends BaseModel
|
||||
{
|
||||
protected $name = 'community_tag';
|
||||
|
||||
public function getIconAttr($value): string
|
||||
{
|
||||
return trim((string) $value) ? FileService::getFileUrl((string) $value) : '';
|
||||
}
|
||||
|
||||
public function setIconAttr($value): string
|
||||
{
|
||||
return trim((string) $value) ? FileService::setFileUrl($value) : '';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user