fix: 🐛 Recaptcha credentials must not be null even if disabled
This commit is contained in:
parent
ebf8902870
commit
935bc05880
6 changed files with 278 additions and 341 deletions
|
@ -90,6 +90,11 @@ class AppServiceProvider extends ServiceProvider
|
|||
|
||||
|
||||
// Set Recaptcha API Config
|
||||
// Load recaptcha package if recaptcha is enabled
|
||||
if(config('SETTINGS::RECAPTCHA:ENABLED') == 'true') {
|
||||
$this->app->register(\Biscolab\ReCaptcha\ReCaptchaServiceProvider::class);
|
||||
}
|
||||
|
||||
//only update config if recaptcha settings have changed in DB
|
||||
if (
|
||||
config('recaptcha.api_site_key') != config('SETTINGS::RECAPTCHA:SITE_KEY') ||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"require": {
|
||||
"php": "^8.0|^7.4",
|
||||
"ext-intl": "*",
|
||||
"biscolab/laravel-recaptcha": "^5.0",
|
||||
"biscolab/laravel-recaptcha": "^5.4",
|
||||
"doctrine/dbal": "^3.1",
|
||||
"fideloper/proxy": "^4.4",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
|
@ -47,7 +47,9 @@
|
|||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
"dont-discover": [
|
||||
"biscolab/laravel-recaptcha"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
600
composer.lock
generated
600
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -180,7 +180,7 @@ return [
|
|||
Illuminate\Translation\TranslationServiceProvider::class,
|
||||
Illuminate\Validation\ValidationServiceProvider::class,
|
||||
Illuminate\View\ViewServiceProvider::class,
|
||||
Biscolab\ReCaptcha\ReCaptchaServiceProvider::class,
|
||||
|
||||
|
||||
/*
|
||||
* Package Service Providers...
|
||||
|
@ -250,7 +250,6 @@ return [
|
|||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'ReCaptcha' => Biscolab\ReCaptcha\Facades\ReCaptcha::class,
|
||||
'DataTables' => Yajra\DataTables\Facades\DataTables::class,
|
||||
|
||||
],
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
|
||||
<div class="input-group mb-3">
|
||||
{!! htmlFormSnippet() !!}
|
||||
@error('g-recaptcha-response')
|
||||
|
@ -72,6 +72,7 @@
|
|||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
|
|
|
@ -101,6 +101,7 @@
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
|
||||
<div class="input-group mb-3">
|
||||
{!! htmlFormSnippet() !!}
|
||||
@error('g-recaptcha-response')
|
||||
|
@ -109,6 +110,7 @@
|
|||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
|
|
Loading…
Reference in a new issue