承接 zacksmash/fortify-ui 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zacksmash/fortify-ui

Composer 安装命令:

composer require zacksmash/fortify-ui

包简介

Fortify-driven Laravel UI replacement

README 文档

README

Introduction

Note

For Laravel 10 and below, use branch v1.x

FortifyUI is an unopinionated authentication starter, powered by Laravel Fortify. It is completely unstyled -- on purpose -- and only includes a minimal amount of markup to get your project running quickly. This package can be used to start your project, or you can use the FortifyUI Preset Template which allows you to create your own preset that you can install with FortifyUI.

In a nutshell...

FortifyUI automates the base installation and configuration of Laravel Fortify, it includes the features that Laravel Fortify recommends implementing yourself and it provides the scaffolding for you to build your own UI around it. Hence, Fortify + UI.

Installation

To get started, you'll need to install FortifyUI using Composer. This will install Laravel Fortify as well so, please make sure you do not have it installed, already.

composer require zacksmash/fortify-ui

Next, you'll need to run the install command:

php artisan fortify:ui

This command will publish FortifyUI's views, add the home route to web.php and add the FortifyUI service provider to your app/Providers directory. This will also publish the service provider and config file for Laravel Fortify. Lastly, it will register both service providers in the app.php config file, under the providers array.

That's it, you're all setup! For advanced setup and configuration options, keep reading!

Configuration

The FortifyUI service provider registers the views for all of the authentication features. If you'd rather not include the FortifyUI service provider, you can skip generating it by using the --skip-provider flag.

php artisan fortify:ui --skip-provider

Then, you can add this to your AppServiceProvider or FortifyServiceProvider, in the boot() method.

Fortify::loginView(function () {
    return view('auth.login');
});

Fortify::registerView(function () {
    return view('auth.register');
});

Fortify::requestPasswordResetLinkView(function () {
    return view('auth.forgot-password');
});

Fortify::resetPasswordView(function ($request) {
    return view('auth.reset-password', ['request' => $request]);
});

// Fortify::verifyEmailView(function () {
//     return view('auth.verify-email');
// });

// Fortify::confirmPasswordView(function () {
//     return view('auth.confirm-password');
// });

// Fortify::twoFactorChallengeView(function () {
//     return view('auth.two-factor-challenge');
// });

To register all views at once, you can use this instead:

Fortify::viewPrefix('auth.');

Now, you should have all of the registered views required by Laravel Fortify, including basic layout and home views, as well as optional password confirmation, email verification and two-factor authentication views.

Features

By default, FortifyUI is setup to handle the basic authentication functions (Login, Register, Password Reset) provided by Laravel Fortify.

Email Verification

To enable the email verification feature, you'll need to visit the FortifyUI service provider and uncomment Fortify::verifyEmailView(), to register the view. Then, go to the fortify.php config file and make sure Features::emailVerification() is uncommented. Next, you'll want to update your User model to include the following:

use Illuminate\Contracts\Auth\MustVerifyEmail;

class User extends Authenticatable implements MustVerifyEmail
{
    ...

This allows you to attach the verified middleware to any of your routes, which is handled by the verify.blade.php file.

More info about this can be found here.

Password Confirmation

To enable the password confirmation feature, you'll need to visit the FortifyUI service provider and uncomment Fortify::confirmPasswordView(), to register the view. This allows you to attach the password.confirm middleware to any of your routes, which is handled by the password-confirm.blade.php file.

Two-Factor Authentication

To enable the two-factor authentication feature, you'll need to visit the FortifyUI service provider and uncomment Fortify::twoFactorChallengeView(), to register the view. Then, go to the fortify.php config file and make sure Features::twoFactorAuthentication is uncommented. Next, you'll want to update your User model to include the following:

use Laravel\Fortify\TwoFactorAuthenticatable;

class User extends Authenticatable
{
    use HasFactory, Notifiable, TwoFactorAuthenticatable;
    ...

That's it! Now, you can log into your application and enable or disable two-factor authentication.

Update User Password/Profile

To enable the ability to update user passwords and/or profile information, go to the fortify.php config file and make sure these features are uncommented:

Features::updateProfileInformation(),
Features::updatePasswords(),

FortifyUI Presets

FortifyUI encourges make your own presets, with your favorite frontend libraries and frameworks. To get started, visit the FortifyUI Preset Template repository, and click the "Use Template" button.

Community Presets

Presets for v1.x can be found in that branch.

License

FortifyUI is open-sourced software licensed under the MIT license.

zacksmash/fortify-ui 适用场景与选型建议

zacksmash/fortify-ui 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 18.16k 次下载、GitHub Stars 达 247, 最近一次更新时间为 2020 年 09 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「zacksmash」 「fortify-ui」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 zacksmash/fortify-ui 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 zacksmash/fortify-ui 我们能提供哪些服务?
定制开发 / 二次开发

基于 zacksmash/fortify-ui 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 18.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 247
  • 点击次数: 5
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 247
  • Watchers: 7
  • Forks: 23
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-27