Download the PHP package noopstudios/filament-edit-profile without Composer
On this page you can find all versions of the php package noopstudios/filament-edit-profile. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download noopstudios/filament-edit-profile
More information about noopstudios/filament-edit-profile
Files in noopstudios/filament-edit-profile
Package filament-edit-profile
Short Description Filament package to edit profile
License MIT
Homepage https://github.com/noopstudios/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.
Enhancements Added in This Fork
This package is a fork of joaopaulolndev/filament-edit-profile by João Paulo Leite Nascimento. We extend our gratitude to the original author for creating such a robust profile management solution for Filament.
Email Management Options
We've added enhanced control over email address management:
- Toggle Email Editing: Ability to enable or disable email editing functionality
- Email Change Verification: Optional email verification process when changing email addresses
On email confirmation there is a redirect after the confirmation, that url can be overriden with "'redirectUrl' => '/admin/edit-profile'," on the cofings file after it is published.
By default, the following configuration is used:
Implementation
Use these methods in your panel provider to customize email behavior:
When email verification is enabled, users receive a verification link to confirm their email change before it takes effect, enhancing security for your application.
Additional Improvements
- Changed the avatar logic to use Spatie Media Library for more robust image management
- Redesigned the profile interface to use a tab layout for better organization of profile sections
- Refactored
EditProfilePage.php
to support the new layout
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 using Spatie Media Library.
- 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 now uses Spatie Media Library for avatar management, providing more robust image handling.
To show the avatar form, you need the following steps:
-
Make sure Spatie Media Library is installed and set up in your project.
-
Add the HasMedia trait and interface to your User model:
-
Enable the avatar form in your plugin configuration:
- 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 - Original Author
- Noop Studios - Current Maintainer
- 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 ^4.0
jenssegers/agent Version ^2.6
spatie/laravel-package-tools Version ^1.15.0
spatie/laravel-medialibrary Version ^11.12
filament/spatie-laravel-media-library-plugin Version ^4.0