@props(['routePrefix', 'browserSessions', 'apiTokens' => null, 'twoFactorSecret' => null, 'twoFactorQrSvg' => null, 'recoveryCodes' => []]) @php $user = auth()->user(); $tokenAbilities = \App\Models\User::API_TOKEN_ABILITIES; @endphp

Profile Information

@csrf @method('PUT') @foreach ([['name', 'Name', 'text', 'name', $user->name, 150, true], ['email', 'Email', 'email', 'username', $user->email, 150, true], ['phone', 'Phone', 'tel', 'tel', $user->phone, 30, false]] as [$field, $label, $type, $autocomplete, $value, $maxLength, $isRequired])
$errors->has($field)]) @error($field) aria-describedby="profile-{{ $field }}-error" @enderror> @error($field)
{{ $message }}
@enderror
@endforeach

Update Password

@csrf @method('PUT')
$errors->updatePassword->has('current_password')]) @error('current_password', 'updatePassword') aria-describedby="password-current-error" @enderror> @error('current_password', 'updatePassword')
{{ $message }}
@enderror
$errors->updatePassword->has('password')]) @error('password', 'updatePassword') aria-describedby="password-new-error" @enderror> @error('password', 'updatePassword')
{{ $message }}
@enderror

Two-Factor Authentication $user->hasTwoFactorEnabled(), 'text-bg-secondary' => ! $user->hasTwoFactorEnabled()])>{{ $user->hasTwoFactorEnabled() ? 'Enabled' : 'Not enabled' }}

@if ($twoFactorQrSvg)

Scan this code with your authenticator app, or type the setup key by hand.

{!! $twoFactorQrSvg !!}

Setup key: {{ $twoFactorSecret }}

@csrf
$errors->has('code')]) @error('code') aria-describedby="two-factor-code-error" @enderror> @error('code')
{{ $message }}
@enderror
@elseif (! $user->hasTwoFactorEnabled())

Add a second step to your sign-in with an authenticator app.

@csrf
@endif @if ($recoveryCodes)

Recovery Codes

Store these somewhere safe. Each one works once if you lose your authenticator.

    @foreach ($recoveryCodes as $code)
  • {{ $code }}
  • @endforeach
@endif @if ($user->hasTwoFactorEnabled())
@csrf
@endif @if ($user->two_factor_secret !== null)
@csrf @method('DELETE')
$errors->disableTwoFactor->has('current_password')]) @error('current_password', 'disableTwoFactor') aria-describedby="two-factor-password-error" @enderror> @error('current_password', 'disableTwoFactor')
{{ $message }}
@enderror
@endif

Active Browser Sessions

@if ($browserSessions->isEmpty())

No active sessions are recorded.

@else
    @foreach ($browserSessions as $session)
  • {{ $session['platform'] }} — {{ $session['browser'] }}
    {{ $session['ip_address'] }} · @if ($session['is_current_device']) This device @else Last active {{ $session['last_active'] }} @endif
  • @endforeach
@endif
@csrf @method('DELETE')
$errors->logoutSessions->has('current_password')]) @error('current_password', 'logoutSessions') aria-describedby="sessions-password-error" @enderror> @error('current_password', 'logoutSessions')
{{ $message }}
@enderror
@if ($apiTokens !== null)

API Tokens

@if (session('plainTextToken'))
Copy this token now. It will not be shown again. {{ session('plainTextToken') }}
@endif
@csrf
$errors->has('name')])>
Permissions @foreach ($tokenAbilities as $ability)
@endforeach @error('abilities')
{{ $message }}
@enderror
@if ($apiTokens->isNotEmpty())
@foreach ($apiTokens as $token) @endforeach
NamePermissionsActions
{{ $token->name }}
@csrf @method('PUT') @foreach ($tokenAbilities as $ability)
abilities, true))>
@endforeach
@csrf @method('DELETE')
@endif
@endif