Download the PHP package mortezamasumi/fb-profile without Composer
On this page you can find all versions of the php package mortezamasumi/fb-profile. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mortezamasumi/fb-profile
More information about mortezamasumi/fb-profile
Files in mortezamasumi/fb-profile
Package fb-profile
Short Description Add a configurable profile form to your Filament user menu.
License MIT
Homepage https://github.com/mortezamasumi/fb-profile
Informations about the package fb-profile
FB Profile — Edit Profile for Filament
A Filament panel plugin that adds a configurable profile form to the user menu, with Persian-aware inputs (avatar upload, name, NID, gender, birth date, mobile, email, username) and an Iranian national ID validator.
Features
- Profile page — replaces the default Filament profile page with a richer, configurable form
- Avatar upload — square avatar with configurable disk, folder, visibility and size limit
- Iranian NID validation — checksum-validated, with a passport-number bypass option
- Persian input helpers — Persian-to-English digit conversion on NID, mobile and email
- Required-field toggles — make mobile, email, username, NID, gender or birth date required via config
- Custom components hook — extend the form from your user model
- Localized — ships English and Persian translations
Installation
Add the plugin to your Filament panel provider:
Configuration
Publish the config file:
| Key | Default | Description |
|---|---|---|
max_avatar_size |
200 |
Max avatar upload size in KB |
avatar_disk |
public |
Disk for avatar uploads |
avatar_visibility |
public |
Avatar visibility |
avatar_folder |
/uploads/avatars |
Avatar upload folder |
mobile_required |
false |
Require the mobile field |
email_required |
false |
Require the email field |
username_required |
false |
Require the username field |
nid_required |
false |
Require the national ID field |
use_passport_number_on_nid |
false |
Accept passport numbers instead of NIDs |
gender_required |
false |
Require the gender field |
birth_date_required |
false |
Require the birth date field |
profile_form_columns |
3 |
Columns in the profile form grid |
Usage
Once the plugin is registered, the profile page is available from the user menu. The form reads your user model's columns; the fields are fully optional unless you enable the *_required flags above.
Extending the form
Your user model can add extra fields or replace the whole form:
Iranian NID validation
The iran_nid validation rule validates the Iranian national ID checksum. It is active in production only, and is bypassed when use_passport_number_on_nid is enabled.
Support policy
| PHP | Laravel |
|---|---|
| 8.3 | 12 |
Testing
The test suite covers the user menu entry, profile updates, redirect behaviour, and the Iranian NID validator using an in-memory SQLite database.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover a security vulnerability, please review our security policy on how to report it.
Changelog
Please see CHANGELOG for recent changes.
License
The MIT License (MIT). See LICENSE.md for details.
All versions of fb-profile with dependencies
ariaieboy/filament-jalali Version ^3.0
filament/filament Version ^5.0
mortezamasumi/fb-essentials Version ^5.0
spatie/laravel-package-tools Version ^1.0