'datetime', ]; /** * Create a new message instance. * * @return void */ public function __construct(ModelsEmailVerify $model) { $this->setValues($model->toArray()); } public function getTemplateName(): string { return 'mails.guests.email_verify'; } public function getSubject(): string { return '【スマートパーキングパス】会員登録のご案内'; } public function getGuestParams(): array { return [ 'url' => $this->getUrl(), 'expiresAt' => $this->getExpiresAt(), ]; } private function getUrl() { return implode( "/", [ config("app.url"), 'register/user', $this->token ] ); } private function getExpiresAt() { $date = $this->expiresAt; if ($date !== null) { return $date->format('Y/m/d H:i'); } throw new Exception("有効期限日付不正"); } }