This commit is contained in:
2023-01-24 15:13:03 +10:00
parent decf5c7d39
commit 4c83399d4a
261 changed files with 33538 additions and 1 deletions

78
app/Mail/Contact.php Normal file
View File

@@ -0,0 +1,78 @@
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class Contact extends Mailable
{
use Queueable;
use SerializesModels;
/**
* The contact name.
*
* @var string
*/
public $name;
/**
* The contact email.
*
* @var string
*/
public $email;
/**
* The contact content.
*
* @var string
*/
public $content;
/**
* Create a new message instance.
*
* @param string $name The contact name.
* @param string $email The contact email.
* @param string $content The contact content.
* @return void
*/
public function __construct(string $name, string $email, string $content)
{
$this->name = $name;
$this->email = $email;
$this->content = $content;
}
/**
* Get the message envelope.
*
* @return \Illuminate\Mail\Mailables\Envelope
*/
public function envelope()
{
return new Envelope(
subject: config('contact.contact_subject'),
);
}
/**
* Get the message content definition.
*
* @return \Illuminate\Mail\Mailables\Content
*/
public function content()
{
return new Content(
view: 'emails.user.contact',
text: 'emails.user.contact_plain',
);
}
}