'require|checkTask', ]; protected $message = [ 'id.require' => '任务id不能为空', ]; public function sceneDelete() { return $this->only(['id']); } public function sceneRetry() { return $this->only(['id']); } public function checkTask($value) { $task = ArticleAiCommentTask::findOrEmpty($value); if ($task->isEmpty()) { return '任务不存在'; } return true; } }