Skip to content

Instantly share code, notes, and snippets.

@rmcdaniel
Created October 29, 2022 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmcdaniel/507728982ba53526ef9bfe1dbf230f98 to your computer and use it in GitHub Desktop.
Save rmcdaniel/507728982ba53526ef9bfe1dbf230f98 to your computer and use it in GitHub Desktop.
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\URL;
class VerifyEmail extends Mailable
{
use Queueable, SerializesModels;
private $workflowId;
public function __construct($workflowId)
{
$this->workflowId = $workflowId;
}
public function envelope()
{
return new Envelope(
subject: 'Verify Email',
);
}
public function content()
{
return new Content(
view: 'emails.verify-email',
with: [
'url' => URL::temporarySignedRoute(
'verify-email',
now()->addMinutes(30),
['workflow_id' => $this->workflowId],
),
],
);
}
public function attachments()
{
return [];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment