mailer('cp_'.MailPurpose::SYSTEM); } public function envelope(): Envelope { return $this->mailboxEnvelope(MailPurpose::SYSTEM, __('verify_email.subject')); } public function content(): Content { $minutes = (int) config('auth.verification.expire', 60); return new Content(view: 'mail.verify-email', with: [ 'name' => $this->user->name, 'minutes' => $minutes, // Built here rather than stored: a signed URL carries its own // expiry, so there is no token to keep, none to leak from the // database, and none to forget to invalidate. 'url' => URL::temporarySignedRoute('verification.verify', now()->addMinutes($minutes), [ 'id' => $this->user->getKey(), // The address is part of what is signed, so a link stops // working the moment somebody changes the address it was // issued for. 'hash' => sha1($this->user->getEmailForVerification()), ]), ]); } }