profile-filament-plugin

Pages

Profile

The Profile page is typically the starting page for the user profile in this plugin. By default, it will display a user's name and the date their account was created, along with a form to edit their name. This, of course, can be customized according to your application's requirements.

Here is a screenshot of what the base Profile page will look like:

base profile page

And here is the default edit form:

base profile edit form

Unless your application is very basic, you will probably want to customize the information shown on the profile information component. The easiest way to handle this would be to provide your own schema to the ProfileInfolist schema class in a service provider:

use Rawilk\ProfileFilament\Filament\Schemas\Infolists\ProfileInfolist;
use Filament\Schemas\Components\Section;
use Rawilk\ProfileFilament\Filament\Actions\EditProfileInfoAction;

ProfileInfolist::configureComponents(fn (): array => [
    Section::make('Custom profile info')
        ->headerActions([
            EditProfileInfoAction::make(),
        ])
        ->schema([
            // ...
        ])
]);

The callback you provide will receive a $user object as a parameter if you need it.

{tip} If you are providing your own schema for this, you'll probably also want to use a different edit profile action to allow the user to edit those fields as well.

You could also extend or replace the ProfileInfo Livewire component instead if you wnat full control over it.

The Profile Info page consists of Livewire components that provide the page's functionality. You can extend, replace, or remove any of the components on this page.

The default Livewire components rendered onto the Profile Info page include:

  • Rawilk\ProfileFilament\Livewire\Profile\ProfileInfo

If you'd rather use your own page class, you are free to do that too. You can provide a class-string of your custom profile info page class to the profileInfoPage() method on the plugin:

use Rawilk\ProfileFilament\ProfileFilamentPlugin;

ProfileFilamentPlugin::make()
    ->profileInfoPage(YourCustomProfileInfo::class)

See Pages for more information on customizing the pages.

If you'd rather disable the page entirely, you can provide a null value to the profileInfoPage() method on the plugin:

use Rawilk\ProfileFilament\ProfileFilamentPlugin;

ProfileFilamentPlugin::make()
    ->profileInfoPage(null)

{note} The profile info page is the default profile page. If you disable it, be sure to provide a different default profile page to the useDefaultProfilePage() method on the plugin.

Previous
Changelog