hypothetical/app/Http/Controllers/Auth/VerificationController.php

45 lines
1.3 KiB
PHP
Raw Permalink Normal View History

<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\VerifiesEmails;
2024-03-19 17:11:58 -04:00
use Illuminate\Routing\Controllers\HasMiddleware;
use Illuminate\Routing\Controllers\Middleware;
2024-03-19 17:11:58 -04:00
class VerificationController extends Controller implements HasMiddleware
{
/*
|--------------------------------------------------------------------------
| Email Verification Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling email verification for any
| user that recently registered with the application. Emails may also
| be re-sent if the user didn't receive the original email message.
|
*/
use VerifiesEmails;
/**
* Where to redirect users after verification.
*
* @var string
*/
protected $redirectTo = RouteServiceProvider::HOME;
/**
2024-03-19 17:11:58 -04:00
* Get the middleware that should be assigned to the controller.
*/
2024-03-19 17:11:58 -04:00
public static function middleware(): array
{
2024-03-19 17:11:58 -04:00
return [
'auth',
new Middleware('signed', only: [ 'verify' ]),
new Middleware('throttle:6,1', only: [ 'verify', 'resend' ]),
];
}
}