verificationUrl($notifiable); if (static::$toMailCallback) { return call_user_func(static::$toMailCallback, $notifiable, $verificationUrl); } return (new MailMessage) ->theme((app()->getLocale() == 'fa') ? 'rtl-theme' : 'default') ->greeting(Lang::get('mail.resetPassword.greeting')) ->salutation(Lang::get('mail.resetPassword.salutation')) ->subject(Lang::get('mail.verifyEmail.subject')) ->line(Lang::get('mail.verifyEmail.excerpt')) ->action(Lang::get('mail.verifyEmail.button'), $verificationUrl); } /** * Get the verification URL for the given notifiable. * * @param mixed $notifiable * @return string */ protected function verificationUrl($notifiable) { return URL::temporarySignedRoute( 'verification.verify', Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)), [ 'id' => $notifiable->getKey(), 'hash' => sha1($notifiable->getEmailForVerification()), ] ); } /** * Set a callback that should be used when building the notification mail message. * * @param \Closure $callback * @return void */ public static function toMailUsing($callback) { static::$toMailCallback = $callback; } }