'require', 'category_id' => 'integer|min:0', 'name' => 'require|length:1,100', 'weight' => 'require|integer|min:0', 'status' => 'integer|min:0', ]; /** * 参数描述 * @var string[] */ protected $field = [ 'id' => 'id', 'category_id' => '分类ID', 'name' => '常用语名称', 'weight' => '权重', 'status' => '状态', ]; /** * @notes 编辑场景 */ public function sceneEdit() { return $this->only(['category_id', 'name', 'weight','status','language_code']); } public function sceneId() { return $this->only(['id']); } }