Added visitor out mail page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
This commit is contained in:
63
app/Mail/VisitorOutMail.php
Normal file
63
app/Mail/VisitorOutMail.php
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<?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 VisitorOutMail extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
public $entry;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*/
|
||||||
|
public function __construct($entry)
|
||||||
|
{
|
||||||
|
$this->entry = $entry;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message envelope.
|
||||||
|
*/
|
||||||
|
public function envelope(): Envelope
|
||||||
|
{
|
||||||
|
return new Envelope(
|
||||||
|
subject: 'Visitor Out Notification',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the message content definition.
|
||||||
|
*/
|
||||||
|
public function content(): Content
|
||||||
|
{
|
||||||
|
$greeting = '<b>Dear Sir</b>';
|
||||||
|
|
||||||
|
return new Content(
|
||||||
|
view: 'mail.visitor-out',
|
||||||
|
with: [
|
||||||
|
'company' => 'CRI Digital Manufacturing Solutions',
|
||||||
|
'greeting' => $greeting,
|
||||||
|
'wishes' => 'Thanks & Regards,<br>CRI Digital Manufacturing Solutions',
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attachments for the message.
|
||||||
|
*
|
||||||
|
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||||
|
*/
|
||||||
|
public function attachments(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
119
resources/views/mail/visitor-out.blade.php
Normal file
119
resources/views/mail/visitor-out.blade.php
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Visitor Out Notification</title>
|
||||||
|
</head>
|
||||||
|
<body style="margin:0;padding:0;background:#ffffff;font-family:Arial,Helvetica,sans-serif;">
|
||||||
|
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" style="background:#ffffff;">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
|
||||||
|
<table width="700" cellpadding="0" cellspacing="0" style="background:#ffffff;border:1px solid #e5e7eb;">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<tr>
|
||||||
|
<td style="background:#0f766e;padding:20px;text-align:center;">
|
||||||
|
<h2 style="margin:0;color:#ffffff;">
|
||||||
|
Visitor Out Notification
|
||||||
|
</h2>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Content -->
|
||||||
|
<tr>
|
||||||
|
<td style="padding:25px;">
|
||||||
|
|
||||||
|
<p style="margin-top:0;">
|
||||||
|
{!! $greeting !!}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
A visitor has checked out. Please find the details below:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table width="100%" cellpadding="10" cellspacing="0"
|
||||||
|
style="border-collapse:collapse;margin-top:15px;">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #d1d5db;width:30%;font-weight:bold;">
|
||||||
|
Visitor Name
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #d1d5db;">
|
||||||
|
{{ $entry?->name ?? '-' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #d1d5db;font-weight:bold;">
|
||||||
|
Mobile Number
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #d1d5db;">
|
||||||
|
{{ $entry?->mobile_number ?? '-' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #d1d5db;font-weight:bold;">
|
||||||
|
Company
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #d1d5db;">
|
||||||
|
{{ $entry?->company ?? '-' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #d1d5db;font-weight:bold;">
|
||||||
|
Purpose of Visit
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #d1d5db;">
|
||||||
|
{{ $entry?->purpose_of_visit ?? '-' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #d1d5db;font-weight:bold;">
|
||||||
|
No of Persons
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #d1d5db;">
|
||||||
|
{{ $entry?->number_of_person ?? '-' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td style="border:1px solid #d1d5db;font-weight:bold;">
|
||||||
|
Out Time
|
||||||
|
</td>
|
||||||
|
<td style="border:1px solid #d1d5db;">
|
||||||
|
{{ $entry?->out_time?->format('d-m-Y h:i A') ?? '-' }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{!! $wishes !!}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<tr>
|
||||||
|
<td style="padding:15px;text-align:center;border-top:1px solid #e5e7eb;font-size:12px;color:#666;">
|
||||||
|
© {{ date('Y') }} {{ $company }}<br>
|
||||||
|
Visitor Management System
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user