added email notification for TicketResource.php, add option to edit users - ban, unban

This commit is contained in:
Gitea
2025-05-18 21:50:24 +05:30
parent c00cad3cf1
commit b43461e180
10 changed files with 410 additions and 2 deletions

View File

@@ -0,0 +1,59 @@
<?php
namespace App\Mail;
use App\Models\Ticket;
use App\Models\TicketResponse;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class TicketResponseNotification extends Mailable
{
use Queueable, SerializesModels;
public Ticket $ticket;
public Collection $responses;
/**
* Create a new message instance.
*/
public function __construct(Ticket $ticket, Collection $responses)
{
$this->ticket = $ticket;
$this->responses = $responses;
}
/**
* Get the message envelope.
*/
public function envelope(): Envelope
{
return new Envelope(
subject: 'Support Ticket Response: #'. $this->ticket->ticket_id,
);
}
/**
* Get the message content definition.
*/
public function content(): Content
{
return new Content(
markdown: 'emails.ticket.response',
);
}
/**
* Get the attachments for the message.
*
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
*/
public function attachments(): array
{
return [];
}
}