Contact page ok SYNC 4

This commit is contained in:
Jérémy Munsch 2022-11-17 17:39:54 +01:00
parent bde869120e
commit 7564d9eba3
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
4 changed files with 19 additions and 4 deletions

View file

@ -2,12 +2,13 @@
namespace App\Http\Controllers\Fo;
use App\Enums\GeneralConfigType;
use App\Enums\StaticPageType;
use App\Http\Controllers\Controller;
use App\Http\Requests\Fo\ContactFormRequest;
use App\Mail\SendContactMail;
use App\Models\GeneralConfig;
use App\Models\Shop;
use App\Models\Setting;
use App\Models\StaticPage;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
@ -39,8 +40,8 @@ class ContactController extends Controller
*/
public function contactSubmit(ContactFormRequest $request)
{
$toMail = \optional(Setting::where('key', 'send_contact_mail_to')->first())->value ??
config('mail.from.address');
$toMail = GeneralConfig::query()->where('type', GeneralConfigType::theme())
->firstOrFail()->data->contact_us_destination_email ?? config('mail.from.address');
// * Envoi du mail d'alerte.
Mail::to($toMail)->send(new SendContactMail($request));

13
package-lock.json generated
View file

@ -22,6 +22,7 @@
"@typescript-eslint/parser": "^5.37.0",
"@voerro/vue-tagsinput": "^2.7.1",
"@vue/eslint-config-typescript": "^11.0.1",
"animate.css": "^4.1.1",
"axios": "^0.21.1",
"bootstrap": "^5.2.2",
"clean-webpack-plugin": "^4.0.0",
@ -3170,6 +3171,12 @@
"ajv": "^6.9.1"
}
},
"node_modules/animate.css": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
"integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==",
"dev": true
},
"node_modules/ansi-html-community": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
@ -14071,6 +14078,12 @@
"dev": true,
"requires": {}
},
"animate.css": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz",
"integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==",
"dev": true
},
"ansi-html-community": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",

View file

@ -31,6 +31,7 @@
"@typescript-eslint/parser": "^5.37.0",
"@voerro/vue-tagsinput": "^2.7.1",
"@vue/eslint-config-typescript": "^11.0.1",
"animate.css": "^4.1.1",
"axios": "^0.21.1",
"bootstrap": "^5.2.2",
"clean-webpack-plugin": "^4.0.0",

@ -1 +1 @@
Subproject commit e59d6b4f7aaa073e0b4e6abcd9181667951d8998
Subproject commit 63162b255390c7fe1de59a2d0a67c50886716703