QR_code_generator/app/Mail/FeedbackSender.php

26 lines
724 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace App\Mail;
use App\Models\Dictionaries\DictionaryItem;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class FeedbackSender extends Mailable implements ShouldQueue {
use Queueable, SerializesModels;
public array $data;
public function __construct(array $data) {
$this->data = $data;
}
public function build() {
$dictionary = DictionaryItem::byUuid($this->data['feedback-type'])->first();
$this->data['feedback-type'] = $dictionary->title;
return $this->subject('Поступило обращение с сайта')->view('mail.feedback.support');
}
}