Add customer contact inquiry system, automated receipt emails, admin communication inbox, and customer profile management

This commit is contained in:
2026-11-02 09:56:24 +01:00
parent 387241f971
commit 9fd39bd7d6
28 changed files with 2426 additions and 8 deletions
@@ -0,0 +1,33 @@
<?php
namespace App\Mail;
use App\Models\Communication;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ContactInquiryConfirmationMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct(public Communication $communication) {}
public function envelope(): Envelope
{
return new Envelope(
from: new Address('noreply@jouwdriedee.nl', 'Jouwdriedee.nl'),
subject: 'Afschrift: Jouw vraag aan Jouwdriedee.nl - '.$this->communication->subject,
);
}
public function content(): Content
{
return new Content(
view: 'emails.contact-inquiry-confirmation',
);
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Mail;
use App\Models\Communication;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ContactInquiryReceivedMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct(public Communication $communication) {}
public function envelope(): Envelope
{
return new Envelope(
subject: '[Nieuwe Klantvraag] #'.$this->communication->id.': '.$this->communication->subject,
replyTo: [
new Address($this->communication->email, $this->communication->name),
],
);
}
public function content(): Content
{
return new Content(
view: 'emails.contact-inquiry-received',
);
}
}
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Mail;
use App\Models\Communication;
use App\Models\CommunicationReply;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Address;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ContactInquiryReplyMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct(
public Communication $communication,
public CommunicationReply $reply
) {}
public function envelope(): Envelope
{
return new Envelope(
from: new Address('info@jouwdriedee.nl', 'Jouwdriedee.nl Klantenservice'),
replyTo: [
new Address('info@jouwdriedee.nl', 'Jouwdriedee.nl Klantenservice'),
],
subject: 'Reactie op jouw vraag: '.$this->communication->subject.' - Jouwdriedee.nl',
);
}
public function content(): Content
{
return new Content(
view: 'emails.contact-inquiry-reply',
);
}
}