lasthourcloud/app/Livewire/VerifyEmail.php

27 lines
584 B
PHP
Raw Normal View History

2023-10-09 12:20:55 +00:00
<?php
2023-12-07 18:06:32 +00:00
namespace App\Livewire;
2023-10-09 12:20:55 +00:00
use Livewire\Component;
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
class VerifyEmail extends Component
{
use WithRateLimiting;
public function again() {
try {
$this->rateLimit(1, 300);
auth()->user()->sendVerificationEmail();
2023-12-07 18:06:32 +00:00
$this->dispatch('success', 'Email verification link sent!');
2023-10-09 12:20:55 +00:00
} catch(\Exception $e) {
ray($e);
return handleError($e,$this);
}
}
public function render()
{
return view('livewire.verify-email');
}
}