filamerce/filament-user-profile
最新稳定版本:v1.1.1
Composer 安装命令:
composer require filamerce/filament-user-profile
包简介
Simple filament user profile.
README 文档
README
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)
统计信息
- 总下载量: 772
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-28