From 3ea0de9fd70d1e536ee0ea55f9879bf0d6ef7123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Wed, 5 Jun 2024 15:25:08 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B8=D1=82=20-=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D1=8B=D0=B9=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BE=D0?= =?UTF-8?q?=B4=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=20-=20=D0=BE=D1=82=D0=BF=D1=80=D0?= =?UTF-8?q?=B0=D0=B2=D0=BA=D0=B0=20=D0=B5=D0=BC=D0=B0=D0=B9=D0=BB=D0=B0=20=D0?= =?UTF-8?q?=B0=D0=B4=D0=BC=D0=B8=D0=BD=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/EmployerController.php | 5 ++ app/Mail/MailCreateEmployer.php | 66 +++++++++++++++++++++++++++ resources/views/emails/create_emp.blade.php | 6 +++ 3 files changed, 77 insertions(+) create mode 100644 app/Mail/MailCreateEmployer.php create mode 100644 resources/views/emails/create_emp.blade.php diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 9479f9a..8837dbd 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -10,6 +10,8 @@ use App\Http\Requests\FlotRequest; use App\Http\Requests\MessagesRequiest; use App\Http\Requests\VacancyRequestEdit; use App\Http\Requests\VacansiaRequiest; +use App\Mail\MailAdminy; +use App\Mail\MailCreateEmployer; use App\Mail\MailSotrudnichestvo; use App\Mail\SendAllMessages; use App\Models\Ad_employer; @@ -475,6 +477,9 @@ class EmployerController extends Controller } else { $user = $this->create($params); event(new Registered($user)); + + Mail::to(env('EMAIL_ADMIN'))->send(new MailCreateEmployer($params)); + Auth::guard()->login($user); } diff --git a/app/Mail/MailCreateEmployer.php b/app/Mail/MailCreateEmployer.php new file mode 100644 index 0000000..68952a7 --- /dev/null +++ b/app/Mail/MailCreateEmployer.php @@ -0,0 +1,66 @@ +data = $data; + } + + /** + * Get the message envelope. + * + * @return \Illuminate\Mail\Mailables\Envelope + */ + public function envelope() + { + return new Envelope( + subject: 'Mail Create Employer', + ); + } + + /** + * Get the message content definition. + * + * @return \Illuminate\Mail\Mailables\Content + */ + public function content() + { + return new Content( + view: 'emails.create_emp', + ); + } + + public function build() + { + // Вернуть все данные + return $this->view('emails.create_emp', ['data' => $this->data]); + } + + /** + * Get the attachments for the message. + * + * @return array + */ + public function attachments() + { + return []; + } +} diff --git a/resources/views/emails/create_emp.blade.php b/resources/views/emails/create_emp.blade.php new file mode 100644 index 0000000..842badf --- /dev/null +++ b/resources/views/emails/create_emp.blade.php @@ -0,0 +1,6 @@ +
+ Зарегистрирован новый работодатель: {{ $data['surname']." ".$data['name_man']." ".$data['surname2'] }}
+ Email: {{ $data['email'] }}
+ Название компании: {{ $data['name_company'] }}
+ Телефон: {{ $data['telephone'] }}
+
-- 1.7.10.4