Files
sbnews/server/app/common/model/community/CommunityCategory.php
T

22 lines
495 B
PHP

<?php
namespace app\common\model\community;
use app\common\model\BaseModel;
use app\common\service\FileService;
class CommunityCategory extends BaseModel
{
protected $name = 'community_post_category';
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) : '';
}
}