@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | // $this->loadRoutesFrom(__DIR__ . '/routes/routes.php'); |
| 39 | 39 | $this->registerRoutes(); |
| 40 | 40 | $this->publishes([ |
| 41 | - __DIR__ . '/../config/recaptcha.php' => config_path('recaptcha.php'), |
|
| 41 | + __DIR__.'/../config/recaptcha.php' => config_path('recaptcha.php'), |
|
| 42 | 42 | ]); |
| 43 | 43 | |
| 44 | 44 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function addValidationRule() |
| 50 | 50 | { |
| 51 | 51 | |
| 52 | - Validator::extendImplicit('recaptcha', function ($attribute, $value, $parameters, $validator) { |
|
| 52 | + Validator::extendImplicit('recaptcha', function($attribute, $value, $parameters, $validator) { |
|
| 53 | 53 | |
| 54 | 54 | return app('recaptcha')->validate($value); |
| 55 | 55 | }, trans('validation.recaptcha')); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | |
| 66 | 66 | $this->mergeConfigFrom( |
| 67 | - __DIR__ . '/../config/recaptcha.php', 'recaptcha' |
|
| 67 | + __DIR__.'/../config/recaptcha.php', 'recaptcha' |
|
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | 70 | $this->registerReCaptchaBuilder(); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | protected function registerReCaptchaBuilder() |
| 106 | 106 | { |
| 107 | 107 | |
| 108 | - $this->app->singleton('recaptcha', function ($app) { |
|
| 108 | + $this->app->singleton('recaptcha', function($app) { |
|
| 109 | 109 | |
| 110 | 110 | $recaptcha_class = ''; |
| 111 | 111 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | public function htmlFormSnippet(): string |
| 38 | 38 | { |
| 39 | 39 | |
| 40 | - return ($this->version == 'v2') ? '<div class="g-recaptcha" data-sitekey="' . $this->api_site_key . '"></div>' : ''; |
|
| 40 | + return ($this->version == 'v2') ? '<div class="g-recaptcha" data-sitekey="'.$this->api_site_key.'"></div>' : ''; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | } |
| 44 | 44 | \ No newline at end of file |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | public function htmlFormButton($buttonInnerHTML = 'Submit'): string |
| 41 | 41 | { |
| 42 | 42 | |
| 43 | - return ($this->version == 'invisible') ? '<button class="g-recaptcha" data-sitekey="' . $this->api_site_key . '" data-callback="biscolabLaravelReCaptcha">' . $buttonInnerHTML . '</button>' : ''; |
|
| 43 | + return ($this->version == 'invisible') ? '<button class="g-recaptcha" data-sitekey="'.$this->api_site_key.'" data-callback="biscolabLaravelReCaptcha">'.$buttonInnerHTML.'</button>' : ''; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | } |
| 47 | 47 | \ No newline at end of file |
@@ -200,8 +200,8 @@ discard block |
||
| 200 | 200 | break; |
| 201 | 201 | default: |
| 202 | 202 | $language = config('recaptcha.default_language', null); |
| 203 | - $query = ($language) ? "?hl=" . $language : ""; |
|
| 204 | - $html = "<script src=\"https://www.google.com/recaptcha/api.js" . $query . "\" async defer></script>"; |
|
| 203 | + $query = ($language) ? "?hl=".$language : ""; |
|
| 204 | + $html = "<script src=\"https://www.google.com/recaptcha/api.js".$query."\" async defer></script>"; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | if ($this->version == 'invisible') { |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | $html .= '<script> |
| 212 | 212 | function biscolabLaravelReCaptcha(token) { |
| 213 | - document.getElementById("' . $formId . '").submit(); |
|
| 213 | + document.getElementById("' . $formId.'").submit(); |
|
| 214 | 214 | } |
| 215 | 215 | </script>'; |
| 216 | 216 | } elseif ($this->version == 'v3') { |
@@ -233,8 +233,8 @@ discard block |
||
| 233 | 233 | |
| 234 | 234 | $validate_function = " |
| 235 | 235 | fetch('/" . config('recaptcha.default_validation_route', |
| 236 | - 'biscolab-recaptcha/validate') . "?" . config('recaptcha.default_token_parameter_name', |
|
| 237 | - 'token') . "=' + token, { |
|
| 236 | + 'biscolab-recaptcha/validate')."?".config('recaptcha.default_token_parameter_name', |
|
| 237 | + 'token')."=' + token, { |
|
| 238 | 238 | headers: { |
| 239 | 239 | \"X-Requested-With\": \"XMLHttpRequest\", |
| 240 | 240 | \"X-CSRF-TOKEN\": csrfToken.content |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | 'response' => $response, |
| 302 | 302 | ]); |
| 303 | 303 | |
| 304 | - $url = $this->api_url . '?' . $params; |
|
| 304 | + $url = $this->api_url.'?'.$params; |
|
| 305 | 305 | |
| 306 | 306 | if (function_exists('curl_version')) { |
| 307 | 307 | |