修改request基类

This commit is contained in:
wuyanwen 2020-01-08 22:31:17 +08:00
parent 480aadd38b
commit a5242b3aea

View File

@ -80,6 +80,12 @@ class CatchRequest extends Request
if (!$validate->check(request()->param(), $this->rules())) {
throw new FailedException($validate->getError());
}
// 每次请求都需要设置创建人
$this->param = array_merge($this->param, [
'creator_id' => $this->user()->id,
]);
} catch (\Exception $e) {
throw new ValidateFailedException($e->getMessage());
}