message
parent
9191645dfc
commit
0bec6fc41f
|
|
@ -11,12 +11,12 @@ class SendFeedbackMessage {
|
|||
|
||||
public function handle(object $event) {
|
||||
try {
|
||||
$array = [
|
||||
'email' => $event->email,
|
||||
'data' => $event->data,
|
||||
];
|
||||
//mail('sergey@bodin.ru', 'Error', print_r($array, 1));
|
||||
Mail::to($event->email)->send(new FeedbackSender());
|
||||
// $array = [
|
||||
// 'email' => $event->email,
|
||||
// 'data' => $event->data,
|
||||
// ];
|
||||
// mail('sergey@bodin.ru', 'Error', print_r($array, 1));
|
||||
Mail::to($event->email)->send(new FeedbackSender($event->data));
|
||||
} catch (\Exception $exception) {
|
||||
mail('sergey@bodin.ru', 'Error', $exception->getTraceAsString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ use Illuminate\Queue\SerializesModels;
|
|||
class FeedbackSender extends Mailable implements ShouldQueue {
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
//public array $data;
|
||||
public array $data;
|
||||
|
||||
public function __construct() {
|
||||
//$this->data = $data;
|
||||
public function __construct(array $data) {
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function build() {
|
||||
|
|
|
|||
|
|
@ -1 +1,9 @@
|
|||
123
|
||||
@extends('mail.layouts.layout')
|
||||
|
||||
@section('content')
|
||||
<p>Вам пришло сообщение с обратной связи.</p>
|
||||
<p class="mb-10">Email отправителя: {{$data['feedback-email']}}</p>
|
||||
<p class="mb-10">Имя отправителя: {{$data['feedback-name']}}</p>
|
||||
<p class="mb-10">Тема сообщения: {{$data['feedback-type']}}</p>
|
||||
<p class="mb-10">Сообщение: {{$data['feedback-message']}}</p>
|
||||
@endsection
|
||||
Loading…
Reference in New Issue