filamerce/filament-user-profile
Filament User Panel
This package draws inspiration from Filament Breezy but does not include two-factor authentication (2FA) functionality.
Rather than offering multiple plugin options, this package provides a streamlined approach to extending and replacing components.
Installation
To install the package, execute the following command:
composer require filamerce/filament-user-panel
Register Plugin
To register the plugin, use the following code snippet:
use Filamerce\FilamentUserProfile\UserProfilePlugin;
$panel->plugins([
UserProfilePlugin::make()
]);
Options
Register User Menu Item
Control whether the plugin should automatically register the user menu item:
UserProfilePlugin::make()
->registerUserMenu(false);
Custom Profile Page
Replace the entire ProfilePage with your custom component:
UserProfilePlugin::make()
->profilePage(MyProfileComponent::class);
Custom Profile Components
Manage the registered components and their order:
use Filamerce\FilamentUserProfile\Livewire\PersonalInfo;
use Filamerce\FilamentUserProfile\Livewire\UpdatePassword;
UserProfilePlugin::make()
->profileComponents([
'personal_info' => PersonalInfo::class,
'update_password' => UpdatePassword::class,
]);
Replace Profile Component
Replace a specific profile component:
use My\Component\PersonalInfo;
UserProfilePlugin::make()
->replaceProfileComponent('personal_info', PersonalInfo::class);
Register New Profile Component
Register a new profile component:
use My\Component\SomeComponent;
UserProfilePlugin::make()
->registerProfileComponent('some_component', SomeComponent::class);
Remove Profile Component
Remove a specific profile component:
use My\Component\SomeComponent;
UserProfilePlugin::make()
->removeProfileComponent('personal_info');
Laravel Sanctum
Laravel Sanctum is automatically detected, and a component to manage Sanctum tokens is displayed in the profile. Control the available abilities with the following code:
UserProfilePlugin::make()
->sanctumAbilities(['read', 'write']);
By default, all tokens are registered with all abilities ([*]).
Two-Factor Authentication
This package is compatible with stephenjude/filament-two-factor-authentication. Simply register the component as shown below:
UserProfilePlugin::make()
->registerProfileComponent('2fa', \Stephenjude\FilamentTwoFactorAuthentication\Livewire\TwoFactorAuthentication::class)
Related Packages
User & Role (via Spatie Roles/Permissions) Manager Resource For Filament Admin
With DadJokes every time you load your control panel you'll be greeted by an epi...
Quick frontend profile page for Laravel building on the default Laravel 5.4 Auth...