28 lines
630 B
PHP
28 lines
630 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\User;
|
|
use App\Services\Auth\TwoFactorEnrollmentState;
|
|
use Illuminate\Http\Request;
|
|
use Inertia\Inertia;
|
|
use Inertia\Response;
|
|
|
|
class ProfileController extends Controller
|
|
{
|
|
/**
|
|
* Display the authenticated user's profile and security settings.
|
|
*/
|
|
public function __invoke(
|
|
Request $request,
|
|
TwoFactorEnrollmentState $enrollmentState
|
|
): Response {
|
|
/** @var User $user */
|
|
$user = $request->user();
|
|
|
|
return Inertia::render('Profile/Show', [
|
|
'twoFactor' => $enrollmentState->for($user),
|
|
]);
|
|
}
|
|
}
|