Download the PHP package joaopaulolndev/filament-edit-profile without Composer
On this page you can find all versions of the php package joaopaulolndev/filament-edit-profile. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download joaopaulolndev/filament-edit-profile
More information about joaopaulolndev/filament-edit-profile
Files in joaopaulolndev/filament-edit-profile
Package filament-edit-profile
Short Description Filament package to edit profile
License MIT
Homepage https://github.com/joaopaulolndev/filament-edit-profile
Informations about the package filament-edit-profile
Filament package to edit profile
The Filament library is a user-friendly tool that simplifies profile editing, offering an intuitive interface and robust features to easily customize and manage user information.
Features & Screenshots
- Edit Information: Manage your information such as email, and password.
- Change Password: Change your password.
- Profile Photo: Upload and manage your profile photo.
- Delete Account: Manage your account, such as delete account.
- Sanctum Personal Access tokens: Manage your personal access tokens.
- Browser Sessions Manage and log out your active sessions on other browsers and devices.
- Custom Fields: Add custom fields to the form.
- Custom Components: Add custom component to the page.
- Support: Laravel 11 and Filament 3.x
Installation
You can install the package via composer:
You can publish and run the migrations with:
Optionally, you can publish the views using
Optionally, you can publish the translations using
You can publish and run all the migrations with:
You can publish the config file with:
Usage
Add in AdminPanelProvider.php
if you want to show for specific parameters to sort, icon, title, navigation group, navigation label and can access, you can use the following example:
Optionally, you can add a user menu item to the user menu in the navigation bar:
If needed you can define the disk and visibility of the avatar image. In the config file add the following:
config/filament-edit-profile.php
Profile Avatar
Show the user avatar form using
shouldShowAvatarForm()
. This package follows the Filament user avatar to manage the avatar.
To show the avatar form, you need the following steps:
-
Publish the migration file to add the avatar_url field to the users table:
-
Add in your User model the avatar_url field in the fillable array:
-
Set the getFilamentAvatarUrlAttribute method in your User model:
-
Optionally, you can specify the image directory path and file upload rules. :
- Don't forget to run the command
php artisan storage:link
Sanctum Personal Access tokens
Show the Sanctum token management component:
Please review Laravel Sanctum Docs
You may install Laravel Sanctum via the install:api
Artisan command:
Sanctum allows you to issue API tokens / personal access tokens that may be used to authenticate API requests to your application. When making requests using API tokens, the token should be included in the Authorization header as a Bearer token.
If you want to control access, you can use condition
, passing Closure or Boolean
Sanctum allows you to assign "abilities" to tokens. by default we have ['create', 'view', 'update', 'delete'] use permissions
to customize
Browser Sessions
To utilize browser session, ensure that your session configuration's driver (or SESSION_DRIVER environment variable) is set to database
.
If you want to control access or disable browser sessions, you can pass a Closure or Boolean
Custom Fields
Optionally, you can add custom fields to the form.
To create custom fields you need to follow the steps below:
-
Publish the migration file to add the custom fields to the users table:
-
Add in your User model the custom field in the fillable array:
-
Add in your User model the custom field in the casts array:
-
Publish the config file using this command:
- Edit the config file
config/filament-edit-profile.php
to add the custom fields to the form as example below:
Custom Components
If you need more control over your profile edit fields, you can create a custom component. To make this process easier, just use the artisan command.
[!NOTE] If you are not confident in using custom components, please review Filament Docs
This will generate a new app/Livewire/CustomProfileComponent.php
component and a new resources/views/livewire/custom-profile-component.blade.php
view which you can customize.
Now in your Panel Provider
, register the new component.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- João Paulo Leite Nascimento
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-edit-profile with dependencies
filament/filament Version ^3.0
jenssegers/agent Version ^2.6
spatie/laravel-package-tools Version ^1.15.0