修改request基类
This commit is contained in:
parent
480aadd38b
commit
a5242b3aea
@ -80,6 +80,12 @@ class CatchRequest extends Request
|
|||||||
if (!$validate->check(request()->param(), $this->rules())) {
|
if (!$validate->check(request()->param(), $this->rules())) {
|
||||||
throw new FailedException($validate->getError());
|
throw new FailedException($validate->getError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 每次请求都需要设置创建人
|
||||||
|
$this->param = array_merge($this->param, [
|
||||||
|
'creator_id' => $this->user()->id,
|
||||||
|
]);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new ValidateFailedException($e->getMessage());
|
throw new ValidateFailedException($e->getMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user