mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update
This commit is contained in:
parent
ed0fe84687
commit
35f954cd84
@ -28,8 +28,8 @@ class CommController extends Controller
|
|||||||
|
|
||||||
public function sendEmailVerify (CommSendEmailVerify $request) {
|
public function sendEmailVerify (CommSendEmailVerify $request) {
|
||||||
$email = $request->input('email');
|
$email = $request->input('email');
|
||||||
$redisKey = 'sendEmailVerify:' . $email;
|
$cacheKey = 'sendEmailVerify:' . $email;
|
||||||
if (Cache::get($redisKey)) {
|
if (Cache::get($cacheKey)) {
|
||||||
abort(500, '验证码已发送,请过一会在请求');
|
abort(500, '验证码已发送,请过一会在请求');
|
||||||
}
|
}
|
||||||
$code = rand(100000, 999999);
|
$code = rand(100000, 999999);
|
||||||
@ -50,7 +50,7 @@ class CommController extends Controller
|
|||||||
abort(500, '发送失败');
|
abort(500, '发送失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
Cache::put($redisKey, $code, 10);
|
Cache::put($cacheKey, $code, 10);
|
||||||
return response([
|
return response([
|
||||||
'data' => true
|
'data' => true
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user