kgalanos/filament-user
Composer 安装命令:
composer require kgalanos/filament-user
包简介
Add option to filamentphp to login with username or email
README 文档
README
Add fields ulid(do not remove id),username,phone and phone_verified_at to User Model and you may login with username/email in filamentphp panel. Also installs and configure
"alperenersoy/filament-export": "*", "stechstudio/filament-impersonate": "^3.0", "bezhansalleh/filament-shield": "*"
Installation
You can install the package via composer:
composer require kgalanos/filament-user
You can publish and run the migrations with:
php artisan vendor:publish --tag="filament-user-migrations"
php artisan migrate
You can update Model User in config\auth.php with:
'model' => \Kgalanos\FilamentUser\Models\User::class,
or you can update
App\Models\User with class User extends \Kgalanos\FilamentUser\Models\User implements FilamentUser { use HasFilamentShield, HasRoles; /** * The attributes that are mass assignable. * * @var array<int, string> */ protected $fillable = [ 'name', 'email', 'password', 'username', 'avatar_url', 'phone', ]; ..... }
Install the Filament Panel Builder by running
php artisan filament:install --panels
You can update App\Providers\Filament\AdminPanelProvider with:
->login(\Kgalanos\FilamentUser\Filament\Pages\Auth\Login::class) ->registration(\Kgalanos\FilamentUser\Filament\Pages\Auth\Register::class) ->passwordReset() ->profile(\Kgalanos\FilamentUser\Filament\Pages\Auth\EditProfile::class) ->discoverPages(base_path('vendor/kgalanos/filament-user/src/Filament/Pages'),'Kgalanos\\FilamentUser\\Filament\\Pages')
You can publish the config file with:
php artisan vendor:publish --tag=filament-shield-config
php artisan vendor:publish --tag="filament-user-config"
This is the contents of the published config file:
return [
];
For the Shield
public function panel(Panel $panel): Panel { return $panel ->plugins([ \BezhanSalleh\FilamentShield\FilamentShieldPlugin::make() ]); }
php artisan shield:install
If there is no user id DB it ask you to create an admin.
php artisan make:filament-resource User
change the App\Filament\Resources
class UserResource extends \Kgalanos\FilamentUser\Filament\Resources\UserResource { protected static ?string $model = App\Models\User::class; public static function form(Form $form): Form { $form= parent::form($form); return $form; } public static function table(Table $table): Table { $table=parent::table($table); return $table; } }
Optionally you can use Kgalanos\FilamentUser\Filament\Widgets\ApplicationInfoWidget update App\Providers\Filament\AdminPanelProvider with:
->widgets([ Widgets\AccountWidget::class, // Widgets\FilamentInfoWidget::class, ApplicationInfoWidget::class, ])
Optionally, you can publish the views,if you use ApplicationInfoWidget::class you have to publish the views
using
php artisan vendor:publish --tag="filament-user-views"
Usage
Testing
composer test
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
License
The MIT License (MIT). Please see License File for more information.
kgalanos/filament-user 适用场景与选型建议
kgalanos/filament-user 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 25 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 08 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「kgalanos」 「filament-user」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kgalanos/filament-user 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kgalanos/filament-user 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kgalanos/filament-user 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Alfabank REST API integration
This is my package conversion
This is my package check-afm
import data to model
Laravel package for Accurate Online API integration.
This is my package filament-user
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-08-19