Created
October 29, 2022 04:13
-
-
Save rmcdaniel/507728982ba53526ef9bfe1dbf230f98 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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