Profile

A /profile page for every signed-in user: update name, email and avatar, change the password, manage two-factor authentication, delete the account. It renders in the user shell, not the admin shell.

The profile page with its information, password, two-factor and delete-account cards
/profile in the user shell.

What it adds

FilePurpose
app/Livewire/Profile/ProfilePage.php and the views under resources/views/livewire/profile/The page and its four cards
app/Livewire/Actions/Logout.phpUsed by the delete-account flow
database/migrations/*_add_avatar_path_to_users_table.php
resources/views/components/modal.blade.php, action-message.blade.phpUsed by the cards
TwoFactorAuthenticatable in app/Models/Concerns/UiKitUser.phpAdded to the generated trait

Install

php artisan ui-kit:install-module profile

No required Composer packages. composer require intervention/image turns on automatic 200 by 200 avatar resizing; without it the upload is stored as sent.

What the installer changes

  • Adds the /profile route between the markers in routes/ui-kit-user.php.
  • Runs the avatar migration and php artisan storage:link, which the avatar upload needs.
  • Regenerates the UiKitUser trait with TwoFactorAuthenticatable and re-applies it.

Routes

RouteName
GET /profileprofile

Two-factor authentication

The card drives Fortify's actions end to end:

  1. Enable generates a secret and shows the QR code.
  2. Confirm, when Fortify's confirm option is on, asks for a code from the authenticator before the secret counts.
  3. Recovery codes are shown and can be regenerated.
  4. Disable removes the secret.

From the next sign-in the core login flow stages the challenge described under Core.

Avatars

Uploads are stored on the public disk under a content-derived extension and the path is saved in users.avatar_path. ui-kit:doctor fails storage linked (profile avatars) when public/storage is missing.

Removing

Delete the Livewire components, views and the two Blade components, remove the route line between the user-route markers, roll back the avatar migration, remove TwoFactorAuthenticatable from the trait, and remove profile from installed_modules.

Was this page helpful?