feat: add community post categories and channels
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?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) : '';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user