To add email verification follow these steps.

TERMINAL COMMANDS:

  1. $ composer require laravel/jetstream
  2. $ php artisan jetstream:install livewire
  3. $ npm run build
  4. $ php artisan migrate
  5. $ code app/Models/User.php
    • uncomment // use Illuminate\Contracts\Auth\MustVerifyEmail;
    • change to: class User extends Authenticatable implements MustVerifyEmail
  6. $ code config/fortify.php
  7. uncomment // Features::emailVerification()

SETUP GMAIL SMTP SERVER:

  1. Go to this url and start on step 7 https://myaccount.google.com/apppasswords, otherwise, start from step 2 below.
  2. Go to https://mail.google.com/mail/u/0/#inbox
  3. Manage Google Account:
  4. Security: https://myaccount.google.com/
  5. 2 step authentication: https://myaccount.google.com/signinoptions/two-step-verification
  6. scroll to App passwords : https://myaccount.google.com/apppasswords
  7. To create a new app specific password, type a name for it below...
  8. App Name: YourAppName
  9. Generated app password
  10. copy pasword:
  11. Click done

Settings:

$ code .env

  1. MAIL_MAILER=smtp
  2. MAIL_HOST=smtp.gmail.com
  3. MAIL_PORT=465
  4. [email protected]
  5. MAIL_PASSWORD=[GMAIL APP PASSWORD]
  6. MAIL_ENCRYPTION=ssl
  7. MAIL_FROM_ADDRESS="[email protected]"
  8. MAIL_FROM_NAME="${APP_NAME}"

$ php artisan config:cache

http://127.0.0.1:8000/register

Resources:

  • https://jetstream.laravel.com/installation.html
  • Video: vrkg5F_DUCg