mirror of
https://github.com/zoe-may/TDoG-Skin.git
synced 2024-11-24 05:42:19 +08:00
25 lines
567 B
PHP
Executable File
25 lines
567 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Listeners;
|
|
|
|
use App\Mail\EmailVerification;
|
|
use App\Models\User;
|
|
use Illuminate\Support\Facades\Mail;
|
|
use Illuminate\Support\Facades\URL;
|
|
|
|
class SendEmailVerification
|
|
{
|
|
public function handle(User $user)
|
|
{
|
|
if (option('require_verification')) {
|
|
$url = URL::signedRoute('auth.verify', ['user' => $user->uid], null, false);
|
|
|
|
try {
|
|
Mail::to($user->email)->send(new EmailVerification(url($url)));
|
|
} catch (\Exception $e) {
|
|
report($e);
|
|
}
|
|
}
|
|
}
|
|
}
|