Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
10 | public function captchaCheck() |
||
11 | { |
||
12 | $response = Input::get('g-recaptcha-response'); |
||
13 | $remoteip = $_SERVER['REMOTE_ADDR']; |
||
14 | $secret = env('RE_CAP_SECRET'); |
||
15 | |||
16 | $recaptcha = new ReCaptcha($secret); |
||
17 | $resp = $recaptcha->verify($response, $remoteip); |
||
18 | |||
19 | if ($resp->isSuccess()) { |
||
20 | return true; |
||
21 | } |
||
22 | |||
23 | return false; |
||
24 | } |
||
26 |