Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
15 | public function captchaCheck() |
||
16 | { |
||
17 | $response = Request::get('g-recaptcha-response'); |
||
18 | $remoteip = $_SERVER['REMOTE_ADDR']; |
||
19 | $secret = config('settings.reCaptchSecret'); |
||
20 | |||
21 | $recaptcha = new ReCaptcha($secret); |
||
22 | $resp = $recaptcha->verify($response, $remoteip); |
||
23 | |||
24 | if ($resp->isSuccess()) { |
||
25 | return true; |
||
26 | } |
||
27 | |||
28 | return false; |
||
29 | } |
||
31 |