EmailVerificationPromptController.php 586 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Http\Controllers\Auth;
  3. use App\Http\Controllers\Controller;
  4. use App\Providers\RouteServiceProvider;
  5. use Illuminate\Http\Request;
  6. class EmailVerificationPromptController extends Controller
  7. {
  8. /**
  9. * Display the email verification prompt.
  10. *
  11. * @param \Illuminate\Http\Request $request
  12. * @return mixed
  13. */
  14. public function __invoke(Request $request)
  15. {
  16. return $request->user()->hasVerifiedEmail()
  17. ? redirect()->intended(RouteServiceProvider::HOME)
  18. : view('auth.verify-email');
  19. }
  20. }