PHP code example of happenv-com / filament-user-profile

1. Go to this page and download the library: Download happenv-com/filament-user-profile library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

happenv-com / filament-user-profile example snippets


use Happenv\FilamentUserProfile\UserProfilePlugin;

$panel->plugins([
    UserProfilePlugin::make()
]);

UserProfilePlugin::make()
    ->registerUserMenu(false);

UserProfilePlugin::make()
    ->profilePage(MyProfileComponent::class);

use Happenv\FilamentUserProfile\Livewire\PersonalInfo;
use Happenv\FilamentUserProfile\Livewire\UpdatePassword;

UserProfilePlugin::make()
    ->profileComponents([
        'personal_info' => PersonalInfo::class,
        'update_password' => UpdatePassword::class,
    ]);

use My\Component\PersonalInfo;

UserProfilePlugin::make()
    ->replaceProfileComponent('personal_info', PersonalInfo::class);

use My\Component\SomeComponent;

UserProfilePlugin::make()
    ->registerProfileComponent('some_component', SomeComponent::class);

use My\Component\SomeComponent;

UserProfilePlugin::make()
    ->removeProfileComponent('personal_info');

UserProfilePlugin::make()
    ->sanctumAbilities(['read', 'write']);

UserProfilePlugin::make()
    ->registerProfileComponent('2fa', \Stephenjude\FilamentTwoFactorAuthentication\Livewire\TwoFactorAuthentication::class)