https://github.com/filamerce/filament-user-panel
User panel functionality for Filament PHP
https://github.com/filamerce/filament-user-panel
filamentphp filamentphp-plugin laravel
Last synced: 9 days ago
JSON representation
User panel functionality for Filament PHP
- Host: GitHub
- URL: https://github.com/filamerce/filament-user-panel
- Owner: filamerce
- License: mit
- Created: 2025-02-28T10:49:55.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2025-02-28T14:38:29.000Z (about 1 year ago)
- Last Synced: 2025-12-08T01:14:26.680Z (5 months ago)
- Topics: filamentphp, filamentphp-plugin, laravel
- Language: PHP
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Filament User Panel
This package draws inspiration from [Filament Breezy](https://github.com/jeffgreco13/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:
```sh
composer require filamerce/filament-user-panel
```
## Register Plugin
To register the plugin, use the following code snippet:
```php
use Filamerce\FilamentUserProfile\UserProfilePlugin;
$panel->plugins([
UserProfilePlugin::make()
]);
```
## Options
### Register User Menu Item
Control whether the plugin should automatically register the user menu item:
```php
UserProfilePlugin::make()
->registerUserMenu(false);
```
### Custom Profile Page
Replace the entire `ProfilePage` with your custom component:
```php
UserProfilePlugin::make()
->profilePage(MyProfileComponent::class);
```
### Custom Profile Components
Manage the registered components and their order:
```php
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:
```php
use My\Component\PersonalInfo;
UserProfilePlugin::make()
->replaceProfileComponent('personal_info', PersonalInfo::class);
```
### Register New Profile Component
Register a new profile component:
```php
use My\Component\SomeComponent;
UserProfilePlugin::make()
->registerProfileComponent('some_component', SomeComponent::class);
```
### Remove Profile Component
Remove a specific profile component:
```php
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:
```php
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](https://github.com/stephenjude/filament-two-factor-authentication). Simply register the component as shown below:
```php
UserProfilePlugin::make()
->registerProfileComponent('2fa', \Stephenjude\FilamentTwoFactorAuthentication\Livewire\TwoFactorAuthentication::class)
```