Forráskód Böngészése

The recaptcha package was updated and the controllers was changed by new updates

Azam Rezayi 4 éve
szülő
commit
ab245dc8ea

+ 1 - 1
app/Http/Controllers/Auth/LoginController.php

@@ -63,7 +63,7 @@ class LoginController extends Controller
         $request->validate([
             $this->username() => ['required', 'string'],
             'password' => ['required', 'string'],
-            'g-recaptcha-response' => ['required', app('cutlet-recaptcha')]
+            'g-recaptcha-response' => ['required', 'cutlet_recaptcha']
         ]);
     }
 }

+ 1 - 1
app/Http/Controllers/Auth/RegisterController.php

@@ -55,7 +55,7 @@ class RegisterController extends Controller
             'mobile' => ['required', 'regex:/^09\d{9}$/', 'digits:11', 'numeric'],
             'email' => ['required', 'string', 'email', 'max:255'],
             'password' => ['required', 'string', 'min:8', 'confirmed'],
-            'g-recaptcha-response' => ['required', app('cutlet-recaptcha')]
+            'g-recaptcha-response' => ['required', 'cutlet_recaptcha']
         ]);
     }
 

+ 1 - 1
composer.json

@@ -18,7 +18,7 @@
         "laravel/ui": "^2.0",
         "santigarcor/laratrust": "^6.0",
         "uxweb/sweet-alert": "^2.0",
-        "va/cutlet-recaptcha": "^1.0"
+        "va/cutlet-recaptcha": "^1.1"
     },
     "require-dev": {
         "facade/ignition": "^2.0",

+ 8 - 7
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "beaed81f2971ce5bd79bfdc5ab09d11e",
+    "content-hash": "dd030fecb961252239cab6c43dd1a564",
     "packages": [
         {
             "name": "asm89/stack-cors",
@@ -3579,16 +3579,16 @@
         },
         {
             "name": "va/cutlet-recaptcha",
-            "version": "v1.0.8",
+            "version": "v1.1.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/va1hi9da9sh2ou0rz2ad1eh7/cutlet-recaptcha.git",
-                "reference": "6c37f226294a188437c7fe2ec6d1efad107b69c7"
+                "reference": "0607a562db366b5515ccc1348068d3940f65eb18"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/va1hi9da9sh2ou0rz2ad1eh7/cutlet-recaptcha/zipball/6c37f226294a188437c7fe2ec6d1efad107b69c7",
-                "reference": "6c37f226294a188437c7fe2ec6d1efad107b69c7",
+                "url": "https://api.github.com/repos/va1hi9da9sh2ou0rz2ad1eh7/cutlet-recaptcha/zipball/0607a562db366b5515ccc1348068d3940f65eb18",
+                "reference": "0607a562db366b5515ccc1348068d3940f65eb18",
                 "shasum": ""
             },
             "require": {
@@ -3630,7 +3630,7 @@
                 "php",
                 "recaptcha"
             ],
-            "time": "2020-05-29T15:31:00+00:00"
+            "time": "2020-06-26T08:49:48+00:00"
         },
         {
             "name": "vlucas/phpdotenv",
@@ -5743,5 +5743,6 @@
     "platform": {
         "php": "^7.2.5"
     },
-    "platform-dev": []
+    "platform-dev": [],
+    "plugin-api-version": "1.1.0"
 }

+ 0 - 8
resources/views/vendor/va/cutlet-recaptcha.blade.php

@@ -1,8 +0,0 @@
-
-<script src="https://www.google.com/recaptcha/api.js?explicit&hl={{ config('cutlet-recaptcha.language') }}" async defer></script>
-<div class="g-recaptcha {{ $hasError ? 'is-invalid' : '' }}" data-sitekey="{{ config('cutlet-recaptcha.site_key') }}"></div>
-@error('g-recaptcha-response')
-<span class="invalid-feedback" role="alert">
-    <strong>{{ $message }}</strong>
-</span>
-@enderror