mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 02:31:09 -05:00
- Added rides index view with search and filter options. - Created rides show view to display ride details. - Implemented API routes for rides. - Developed authentication routes for user registration, login, and email verification. - Created tests for authentication, email verification, password reset, and user profile management. - Added feature tests for rides and operators, including creation, updating, deletion, and searching. - Implemented soft deletes and caching for rides and operators. - Enhanced manufacturer and operator model tests for various functionalities.
28 lines
800 B
PHP
28 lines
800 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Auth;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Auth\Events\Verified;
|
|
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
|
use Illuminate\Http\RedirectResponse;
|
|
|
|
class VerifyEmailController extends Controller
|
|
{
|
|
/**
|
|
* Mark the authenticated user's email address as verified.
|
|
*/
|
|
public function __invoke(EmailVerificationRequest $request): RedirectResponse
|
|
{
|
|
if ($request->user()->hasVerifiedEmail()) {
|
|
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
|
|
}
|
|
|
|
if ($request->user()->markEmailAsVerified()) {
|
|
event(new Verified($request->user()));
|
|
}
|
|
|
|
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
|
|
}
|
|
}
|