feat: allow editing community post content
This commit is contained in:
@@ -17,11 +17,14 @@ class CommunityPostValidate extends BaseValidate
|
||||
'sort' => 'require|integer|egt:0|elt:1000000',
|
||||
'is_topic' => 'require|in:0,1',
|
||||
'category_id' => 'require|integer|egt:0|checkCategory',
|
||||
'content' => 'require|max:16000',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'id.require' => '帖子id不能为空',
|
||||
'status.require' => '状态不能为空',
|
||||
'content.require' => '帖子内容不能为空',
|
||||
'content.max' => '帖子内容不能超过16000个字符',
|
||||
];
|
||||
|
||||
public function sceneDetail()
|
||||
@@ -39,6 +42,11 @@ class CommunityPostValidate extends BaseValidate
|
||||
return $this->only(['id', 'status']);
|
||||
}
|
||||
|
||||
public function sceneEditContent()
|
||||
{
|
||||
return $this->only(['id', 'content']);
|
||||
}
|
||||
|
||||
public function sceneTop()
|
||||
{
|
||||
return $this->only(['id', 'is_top']);
|
||||
|
||||
Reference in New Issue
Block a user