wychoong/filament-fortify
最新稳定版本:v0.3.4
Composer 安装命令:
composer require wychoong/filament-fortify
包简介
Laravel Fortify for Filament Admin
README 文档
README
Laravel Fortify for Filament Admin
This package provides the UI for using Fortify in Filament Admin Panel
Screenshots
Login
Register
Email Verification
Forgot Password
Two Factor Login
Two Factor Page
Password Confirmation
Installation
You can install the package via composer:
composer require wychoong/filament-fortify
You can intallation command and run the migrations with:
php artisan filament-fortify:install php artisan migrate
The installation command does few things to speed up the installation process:
- Publish Fortify files
- Publish Fortify migration
- Add FortifyServiceProvider to config/app.php
As this package is only providing UI for Fortify, kindly refer Laravel Fortify documentation to setup, eg: User model.
Optional
You can publish filament-fortify config file with:
php artisan vendor:publish --tag="filament-fortify-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-fortify-views"
Usage
This package respect the features configured in config/fortify.php, refer Laravel Fortify to enable/disable features.
To make the installation seemless, the following configs are overrided in the package.
config([ ## override filament login page 'filament.auth.pages.login' => Auth\Login::class, ## force fortify view enabled 'fortify.views' => true, ## force fortify to use filament home_url 'fortify.home' => config('filament.home_url'), ]);
Email Verification
To allow user access only after email verified, enable the feature in config/fortify.php and update config/filament.php
'middleware' => [ 'auth' => [ // ... 'verified' ], // ... ] ## update your User model use Illuminate\Contracts\Auth\MustVerifyEmail; class User extends Authenticatable implements FilamentUser, MustVerifyEmail { // ... }
Password Confirmation
To request user password confirmation before access a Page/Resource, add
protected static string | array $middlewares = ['password.confirm'];
to relevant Page/Resource.
2FA
Update your User model
use Laravel\Fortify\TwoFactorAuthenticatable; class User extends Authenticatable implements FilamentUser { // ... use TwoFactorAuthenticatable; // ... }
A simple enable/disable user's 2fa page is included.
You can change the page's title, navigation group, navigation label in service provider:
use WyChoong\FilamentFortify\Facades\FilamentFortify; public function boot() { FilamentFortify::navigationGroup(__('your-nav-group')); FilamentFortify::navigationLabel(__('your-nav-label')); FilamentFortify::pageTitle(__('your-page-title')); }
To disable it, publish the config file and set:
'register-page' => false,
Customization
To use your own form, publish the config file and set your own livewire component
# config/filament-fortify.php use App\Http\Livewire\Login; return [ // ... 'auth' => [ 'login' => Login::class, // ... ], // ... ]; # app/Http/Livewire/Login.php namespace App\Http\Livewire\Auth; use WyChoong\FilamentFortify\Http\Livewire\Auth\Login as BaseLogin; class Login extends BaseLogin{ protected function getFormSchema(): array { return [ // your form schema ]; } }
Theme
Depends on your project setup, you might register the css file with Filament::serving as per Filament Documentation, then you need to publish the fortify.config and add DispatchServingFilamentEvent::class to the middleware for Fortify's routes.
use Filament\Http\Middleware\DispatchServingFilamentEvent; return [ // ... 'middleware' => ['web', DispatchServingFilamentEvent::class], //... ];
Render hooks
Make use of Filament's render hook to register additional content without publishing views.
Example with Filament-Socialite
## in Service Provider file public function boot() { Filament::registerRenderHook( 'filament-fortify.login.end', fn (): string => Blade::render('@livewire(\'filament-socialite.buttons\')'), ); }
Available hooks
- filament-fortify.login.start
- filament-fortify.login.end
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.
wychoong/filament-fortify 适用场景与选型建议
wychoong/filament-fortify 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.49k 次下载、GitHub Stars 达 33, 最近一次更新时间为 2022 年 03 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「wychoong」 「filament-fortify」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 wychoong/filament-fortify 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wychoong/filament-fortify 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 wychoong/filament-fortify 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Alfabank REST API integration
MPGS payment adapter for Lunar
This package helps to extract view from vendor package using artisan command
Laravel package for Accurate Online API integration.
Shared RCX Laravel DataTables UI and configuration helpers.
Boot a Laravel project on any machine with one command: app:serve installs missing tools (PHP, Node, Composer, Herd, Docker), creates .env, sets up the database, runs migrations, builds assets, starts a queue worker and serves via Herd, Sail or artisan serve; app:down cleanly stops everything it sta
统计信息
- 总下载量: 14.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 33
- 点击次数: 22
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-02







