Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 451d9e6

Browse files
committed
ReCaptchaController created
1 parent bafd090 commit 451d9e6

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* Copyright (c) 2017 - present
4+
* LaravelGoogleRecaptcha - ReCaptchaController.php
5+
* author: Roberto Belotti - [email protected]
6+
* web : robertobelotti.com, github.com/biscolab
7+
* Initial version created on: 4/2/2019
8+
* MIT license: https://github.com/biscolab/laravel-recaptcha/blob/master/LICENSE
9+
*/
10+
11+
namespace Biscolab\ReCaptcha\Controllers;
12+
13+
use Illuminate\Routing\Controller;
14+
15+
/**
16+
* Class ReCaptchaController
17+
* @package Biscolab\ReCaptcha\Controllers
18+
*/
19+
class ReCaptchaController extends Controller {
20+
21+
/**
22+
* @return array
23+
*/
24+
public function validateV3(): array {
25+
26+
$token = request()->input(config('recaptcha.default_token_parameter_name', 'token'), '');
27+
return recaptcha()->validate($token);
28+
}
29+
}

0 commit comments

Comments
 (0)