home-erp

git clone git://archive.git.mtrnord.blog/MTRNord/home-erp.git
Log | Files | Refs | README

verify-email.blade.php (1902B)


      1 <?php
      2 
      3 use App\Providers\RouteServiceProvider;
      4 use Livewire\Attributes\Layout;
      5 use Livewire\Volt\Component;
      6 
      7 new #[Layout('layouts.guest')] class extends Component
      8 {
      9     public function sendVerification(): void
     10     {
     11         if (auth()->user()->hasVerifiedEmail()) {
     12             $this->redirect(
     13                 session('url.intended', RouteServiceProvider::HOME),
     14                 navigate: true
     15             );
     16 
     17             return;
     18         }
     19 
     20         auth()->user()->sendEmailVerificationNotification();
     21 
     22         session()->flash('status', 'verification-link-sent');
     23     }
     24 
     25     public function logout(): void
     26     {
     27         auth()->guard('web')->logout();
     28 
     29         session()->invalidate();
     30         session()->regenerateToken();
     31 
     32         $this->redirect('/', navigate: true);
     33     }
     34 }; ?>
     35 
     36 <div>
     37     <div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
     38         {{ __('Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }}
     39     </div>
     40 
     41     @if (session('status') == 'verification-link-sent')
     42         <div class="mb-4 font-medium text-sm text-green-600 dark:text-green-400">
     43             {{ __('A new verification link has been sent to the email address you provided during registration.') }}
     44         </div>
     45     @endif
     46 
     47     <div class="mt-4 flex items-center justify-between">
     48         <x-primary-button wire:click="sendVerification">
     49             {{ __('Resend Verification Email') }}
     50         </x-primary-button>
     51 
     52         <button wire:click="logout" type="submit" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">
     53             {{ __('Log Out') }}
     54         </button>
     55     </div>
     56 </div>